function writeYear()
{  
var d = new Date();
d = d.getFullYear()

document.write(d)
}


function showRightPanel()
{
document.write('<IFRAME width=185 height=560 src="right.htm" scrolling="no" frameborder="0"></iframe>')
}

function showHeader()
{
document.write('<IFRAME width=100% height=90 src="header.htm" scrolling="no" frameborder="0"></iframe>')
}
function showFooter()
{
document.write('<IFRAME width=100% height=200 src="footer.htm" scrolling="no" frameborder="0"></iframe>')
}


// To top of the page, not the frame
function goTop()
{
// Always add #, otherwise indexOf will generate an error if missing
sURL = parent.location + "#"
sURL = sURL.split("#")
sURL = sURL[0]

//alert(sURL)

parent.location= sURL + '#top'
}

function saveMyMarriage()
{
window.open('http://haibop.savemarria.hop.clickbank.net')
}

function handleDivorce(bIsLegalZoom)
{
if(bIsLegalZoom)
{
window.open('http://www.kqzyfj.com/click-1828222-5388117')
}
else
{
window.open('http://haibop.c4ddefense.hop.clickbank.net')
}

}

// Ad tracking
/* 
ChildCustomy 
*/
var iSiteID = 100

// Show 2 stacked ads, short list for each
function showAd(bShort)
{

return;

/*
This one shows the ad of this site from 7Search
showAdEx("child+custody", 2)
*/

showAdEx("child+custody", 2)

return


showAdEx("divorce", 2)

// Full size?
if(!bShort)
{
showAdEx("divorce+lawyer", 1)
showAdEx("debt+consolidation", 2)
}

}

// Called by showAd()
function showAdEx(sKeywords, iLength, iTemplate)
{
var sHTML


//return



// Default template
if(!iTemplate)
{
iTemplate = 0
}

// Default length
if(!iLength)
{
iLength = 5
}

// &sid= (site ID)
// &test=on (testing mode)
sHTML = '<script ' +
'src="http://search.revenuepilot.com/servlet/search?mode=js&id=20139&tid=' + iTemplate + '&perpage=' + iLength + '&filter=off' +
'&skip=0&by=off&sid=' + iSiteID + '&keyword=' + sKeywords + '"></script>\n'

document.write(sHTML)
}


// Search Box
function showSearchBox()
{

var sHTML = '<form name="form" method="get" action="http://search.revenuepilot.com/servlet/search">\n' +
'  <table align="center" width="321" border="0" cellspacing="0" cellpadding="0">\n' +
'    <tr>\n' +
'      <td><img src="http://www.revenuepilot.com/userimages/searchbox/searchbox_09_01.jpg" width="321" height="16" alt="" /></td>\n' +
'    </tr>\n' +
'    <tr>\n' +
'      <td background="http://www.revenuepilot.com/userimages/searchbox/searchbox_09_02.jpg" height="69" valign="bottom">\n' +
'        <table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">\n' +
'          <tr>\n' +
'            <td align="center">\n' +
'               <input type="text" name="keyword" style="border: solid 1px black;">\n' +
'               <input type="hidden" name="id" value="20139">\n' +
'         <input type="hidden" name="tid" value="0">\n' +
'               <input type="hidden" name="sid" value="' + iSiteID + '">\n' +
'               <input type="hidden" name="filter" value="off">\n' +
'               <input type="hidden" name="tid" value="0">\n' +
'               <input type="hidden" name="mode" value="search">\n' +
'               <input type="image" src="http://www.revenuepilot.com/userimages/searchbox/search_01.gif" align="center" value=Search border=0 width="57" height="16">\n' +
'            </td>\n' +
'          </tr>\n' +
'          <tr>\n' +
'            <td><img src="http://www.revenuepilot.com/userimages/searchbox/5.gif" width="1" height="5" alt="" /></td>\n' +
'          </tr>\n' +
'        </table>\n' +
'      </td>\n' +
'    </tr>\n' +
'  </table>\n' +
'</form>\n' 


document.write(sHTML)
}

// Do not show reminder, see showReminder()
//var ibToNewPage
var sReminder = "reminder.htm"
function showPage(sURL, bNewPage)
{

sReminder = ""
if(bNewPage)
{
window.open(sURL)
}
else
{
top.document.location.href = sURL
}

}

// Show as popunder
function showReminder(sURL)
{

return

if(!sURL)
{
	sURL = 'reminder.htm'
}

var win = window.open(sURL)

// As popunder just in case the search box has taken over the main page and therefore the reminder page is displayed
win.blur()
window.focus() 

}

function getLegalHelp()
{
window.open('http://www.tkqlhce.com/click-1828222-8261999')
}



function myHelp(sTopic)
{

if(sTopic)
{
sTopic = sTopic.toLowerCase()
}


if(sTopic == 'statelaw')
{
sTopic = 'http://haibop.custody100.hop.clickbank.net'
}
else if(sTopic == '25strategies')
{
sTopic = 'http://haibop.custody109.hop.clickbank.net'
}
else if(sTopic == '49itemchecklist')
{
sTopic = 'http://haibop.custody116.hop.clickbank.net'
}
else if(sTopic == 'giveupparentalrights')
{
sTopic = 'http://haibop.custody102.hop.clickbank.net'
}
else if(sTopic == 'childcustodyincanada')
{
sTopic = 'http://haibop.custody123.hop.clickbank.net'
}
else if(sTopic == 'parentalalienation')
{
sTopic = 'http://haibop.custody106.hop.clickbank.net'
}
else if(sTopic == 'unmarriedparentsandchildcustody')
{
sTopic = 'http://haibop.custody112.hop.clickbank.net'
}
else if(sTopic == 'relocationwithchild')
{
sTopic = 'http://haibop.custody108.hop.clickbank.net'
}
else if(sTopic == 'domesticviolence')
{
sTopic = 'http://haibop.custody127.hop.clickbank.net'
}
else if(sTopic == 'childcustodyevaluation')
{
sTopic = 'http://haibop.custody110.hop.clickbank.net'
}
else if(sTopic == 'faq')
{
sTopic = 'http://haibop.custody105.hop.clickbank.net'
}
else if(sTopic == 'manincourt')
{
sTopic = 'http://haibop.custody118.hop.clickbank.net'
}
else if(sTopic == 'emancipation')
{
sTopic = 'http://haibop.custody103.hop.clickbank.net'
}
else if(sTopic == 'lawyer')
{
sTopic = 'http://haibop.custody107.hop.clickbank.net'
}
else if(sTopic == 'publication')
{
sTopic = 'http://haibop.custody101.hop.clickbank.net'
}
else if(sTopic == 'enforcement')
{
sTopic = 'http://haibop.custody122.hop.clickbank.net'
}
else if(sTopic == 'budget')
{
sTopic = 'http://haibop.custody113.hop.clickbank.net'
}
else if(sTopic == 'womanincourt')
{
sTopic = 'http://haibop.custody117.hop.clickbank.net'
}

// Main
else
{
sTopic = 'http://haibop.custody05.hop.clickbank.net'
}

window.open(sTopic)
}
