gsession = ggetCookie("gmpsess");
gusert = ggetCookie("usert");

username = ggetCookie("username");


goinghome=0;
function ghome() {
	if(goinghome==1){
	} else {
		gsetCookie("gwhichstartpage","", "", "/", gGetCookieDom());
		var gurl = document.qform.Keywords.value + '';
		var orient = '';
		if (document.qform.extrascol1[1].checked){
			orient ='+and+plate';
		}
		if (document.qform.extrascol1[2].checked){
			orient ='+and+hdri';
		}
		if (document.qform.extrascol1[3].checked){
			orient ='+and+ddhdri';
		}
	        if(gsession &&  ( ( parent.content && parent.content.left ) || parent.frames[1].frames[2])) {
	                var theurl= '/bin/Cklb?glo=1&supst=bkjs&max_res=200&Keywords=' + gurl + orient;
			parent.location=theurl;
			goinghome=1;

	        } else {
			var theurl= '/SwishSearch?glo=1&supst=bkjs&max_res=200&submit.x=0&submit.y=0&Keywords=' + gurl + orient ;
			self.location=theurl;
			goinghome=1;
	        }
	}
}


document.write('<TABLE WIDTH=100% height=62 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="#95ddf3">');
document.write('	<form method="get" action="javascript: ghome();" enctype="application/x-www-form-urlencoded" name="qform">');
document.write('	<TR>');
document.write('		<td valign="top">&nbsp;</td>');
document.write('		<td width=61 align="right"valign=bottom  style="padding-bottom:3px;" id="simgimg"><IMG src="/graphics/search_header_sliced_14.gif" height=16 width=56 border=0 style="padding-bottom: 3px;padding-left:5px;"></td>');
document.write('		<td valign="bottom" width=212  style="padding-bottom:3px;">');
document.write('				<div style="padding-bottom: 3px;padding-right: 6px;" id="sboxbox">');
document.write('						<input type="text" name="Keywords" maxlength="200" class="homekeys" value="enter keywords" onfocus="javascript:if(this.value==\'enter keywords\'){this.value=\'\';}showcorrectopts();MM_showHideLayers(\'flash2div\',\'\',\'hide\');">');
document.write('				</div>');
document.write('		</td>');
document.write('		<td width="5" valign="top"> </td>');
document.write('		<td valign="bottom" width="13"  style="padding-bottom:3px;"><div style="padding-bottom: 2px;"><input type="radio" name="extrascol1" onclick="javascript:showcorrectopts();MM_showHideLayers(\'flash2div\',\'\',\'hide\');"  value="2d" checked align="bottom"></div><div style="height:3px;"></div></td><td width=100 valign=bottom><img src=/graphics/all_images_header_sliced_16.gif height=16 width=95 border=0 style="margin-bottom:7px;"></td>');
document.write('		<td valign="bottom" width="13" style="padding-bottom:3px;"><div style="padding-bottom: 2px;"><input type="radio" name="extrascol1" onclick="javascript:showcorrectopts();MM_showHideLayers(\'flash2div\',\'\',\'hide\');"  value="hdr" align="bottom"></div><div style="height:3px;"></div></td><td width=100 valign=bottom><img src=/graphics/hdri_plates_header_sliced_18.gif height=16 width=95 border=0 style="margin-bottom:7px;"></td>');
document.write('		<td valign="bottom" width="13" style="padding-bottom:3px;"><div style="padding-bottom: 2px;"><input type="radio" name="extrascol1" onclick="javascript:showcorrectopts();MM_showHideLayers(\'flash2div\',\'\',\'hide\');"  value="hdd" align="bottom"></div><div style="height:3px;"></div></td><td width=100 valign=bottom><img src=/graphics/hdri_domes_header_sliced_20.gif height=16 width=95 border=0 style="margin-bottom:7px;"></td>');
document.write('		<td valign="bottom" width="13" style="padding-bottom:3px;"><div style="padding-bottom: 2px;"><input type="radio" name="extrascol1" onclick="javascript:showcorrectopts();MM_showHideLayers(\'flash2div\',\'\',\'hide\');"  value="designdomes" align="bottom"></div><div style="height:3px;"></div></td><td width=100 valign=bottom><img src=/graphics/design_domes_header_sliced_22.gif height=16 width=95 border=0 style="margin-bottom:7px;"></td>');
document.write('		<td width="5" valign="top"> </td>');
document.write('		<td valign="bottom" width="26" style="padding-bottom:3px;">');
document.write('			<input type="image"  name="Search" src="/graphics/button_go.gif" alt="Start Search" border="0" onclick="ghome(); return false" /></td>');
document.write('		<td width="5" valign="top"> </td>');
document.write('                </form>');
document.write('		<td valign="bottom" align="right" width=206 >');
if(gsession) {
	document.write('<DIV style="padding:10px;">');
	if(username){document.write(username);}
	document.write(" currently logged in<BR><A href=javasc" + "ript:gdeleteCookie('username','',gGetCookieDom());gdeleteCookie('gmpsess','',gGetCookieDom());gdeleteCookie('gmpauth','',gGetCookieDom());top.location='/index.shtml';>sign out</a></DIV>");
}else {
document.write('        <form method="get" action="/bin/Cklb" enctype="application/x-www-form-urlencoded" target="content" name="loginform"><input type="hidden" name="ref" value="/nav_index3.shtml"><input type="hidden" name="login" value="dood">');
document.write('                <table cellspacing="0" cellpadding="2" border="0" align="center" width="116">');
document.write('                <tr>');
document.write('                    <td align=right width=56><IMG src=/graphics/username_header_sliced_11.gif width=56 height=16 border=0></td>');
document.write('                        <td><input type="text" name="username" size="11" class="homefields" onblur="javascript:if (navigator.cookieEnabled) {gsetCookie2(\'username\',this.value);"></td>');
document.write('                </tr>');
document.write('                <tr>');
document.write('                        <td align=right><IMG src=/graphics/password_header_sliced_24.gif width=56 height=16 border=0></td>');
document.write('                        <td><input type="password" name="password" class="homefields" size="11"></td><td><input type="image" src="/graphics/button_go.gif" border=0 name="login" value="Login"></td>');
document.write('                </tr>');
document.write('                </table><div style="padding-right: 43px;line-height: 9px;text-decoration:none;"><A href=/bin/Register style="text-decoration:none;">create an account</A></div><div style="height:2px;"></div></td>');
}
document.write('		<td valign="top">&nbsp;</td>');
document.write('        </TR>');
document.write('</TABLE>');

if(gusert && gusert=='dgen'){
	document.getElementById('simgimg').style.visibility = 'hidden';
	document.getElementById('sboxbox').style.visibility = 'hidden';
}
