var img_farm_main = '/common';
//Default background image for footer bar
var wcFtrBar = "background: url("+ img_farm_main +"/images/nav_bar/stripe.gif);background-repeat: repeat; height: 15px; width:100%; margin-top:6px;";

function printWCFooter() {
	wr('   <table width="800" border="0" cellspacing="0" cellpadding="0">');
	wr('   <tr>');
	wr('       <td>');
	wr('            <div align="center" class="wcFtr">');
	wr('	    <img src="'+ img_farm_main + '/clr.gif" width="1" height="10"><br>');
	wr('	<a href="/" class="wcFtr">Home</a> |');
	wr('	<a href="/" class="wcFtr">Planning Tools</a> |');
	wr('	<a href="/" class="wcFtr">Ideas &amp; Advice</a> |');
	wr('	<a href="/" class="wcFtr">Wedding Gowns</a> |');
	wr('	<a href="/" class="wcFtr">Local Wedding Vendors</a> |');
	wr('	<a href="startregistry.html" class="wcFtr">Wedding Registry Center</a> |');
	wr('	<a href="/" class="wcFtr">Wedding Gift Store</a> |');
	wr('	<a href="/" class="wcFtr">Wedding Talk</a><br/>');
	wr('	<a href="/" class="wcFtr">Privacy Policy</a> |');
	wr('	<a href="/" class="wcFtr">Terms Of Use</a> |');
	wr('	<a href="startregistry.html" class="wcFtr">Contact Us</a> |');
	wr('	<a href="/" class="wcFtr">FREE Subscriptions</b></a> |');
	wr('	<a href="/" class="wcFtr">Advertise With Us</a> |');
	wr('	<a href="/" class="wcFtr">Company Info</a> |');
	wr('	<a href="/" class="wcFtr">Survey</a> |');
	wr('	<a href="/" class="wcFtr">Guest Home</a> | ');
	wr('	<a href="/" class="wcFtr">Order Status</a><br>');
	wr('	<span class=partnerftr>OUR SISTER SITES: <a href=http://www.healthisland.cn/ target=_blank>HealthIsland.cn</a></span><br/> ');
	wr('	&copy; 1997-2008 WeddingWorldSite.com |');
	wr('	<a href="/" class="wcFtr">HELP</a>');
	wr('	&nbsp;|&nbsp;<a href="/" class="wcFtr">Couples Directory</a>');
	wr('	&nbsp;|&nbsp;<a href="/" class="wcFtr">Site Map</a>');
	wr('	&nbsp;|&nbsp;<a href="startregistry.html" class="wcFtr">Partner with us</a><br>');
    wr('	<div style="' + wcFtrBar +'"></div>');
    wr('</div>');
    wr('    </td>');
    wr('</tr>');
    wr('</table>');
}  

function printWWFtr() {

wr('<div align="center" class="wcFtr">');
wr('	<img src="'+ img_farm_main + '/clr.gif" width="1" height="20"><br>');
wr('	'+getCoupleSearchURL()+' |');
    if (window.name != "pwp_preview" && isIdentified) {	//	Display only if user is recognized
        wr('	'+getUpdateWWURL()+' |');
    }

wr('	'+getCreateWWURL()+' |');
wr('	<a href="/" class="wcFtr">Privacy Policy</a> |');
wr('	<a href="/" class="wcFtr">Terms Of Use</a><br>');
wr('	&copy; 1997-2008 WeddingWorldSite.com<br>');
wr('	<img src="'+ img_farm_main + '/clr.gif" width="1" height="20">');
wr('</div>');
}

//	determine if the regular navbar is to be printed or a custom one
if(typeof(wcNavType) == "undefined") {
    var wcNavType = "default";		//	boolean
}

//	This if statement sets up login used
if(typeof(isIdentified) == "undefined") {
    var isIdentified = false;		//	boolean
}

if (wcNavType == "default") {
    printWCFooter();
} else if (wcNavType == "wwGuestNav") {	//	Wedding Website Guest Side footer
    printWWFtr();
}

function getCoupleSearchURL() {
    if(typeof(coupleSearchURL) == 'undefined') {
        return '<a href="/" class="wcFtr">Search for another couple</a>';
    } else {
        return coupleSearchURL;
    }
}

function getUpdateWWURL() {
    if(typeof(updateWWURL) == 'undefined') {
        return '<a href="/" class="wcFtr">Update your wedding website</a>';
    } else {
        return updateWWURL;
    }
}

function getCreateWWURL() {
    if(typeof(createWWURL) == 'undefined') {
        return '<a href="/" class="wcFtr">Create you own wedding website</a>';
    } else {
        return createWWURL;
    }
}

function wr(txt){
    document.write(txt);
}

function isSecure(){
    return window.location.protocol == 'https:';
}
