/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/


var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:15px;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:15px;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
//slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="_blank">'

slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" title="'+this.theimages[picindex][1]+'">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
//////////////END OF  Ultimate Fade-In Slideshow //////
function open_win_tool(p_page_name,p_height,p_width)
{
	var winl =((screen.width)/2)-250;
	var wint = ((screen.height)/2)-250;
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	window.open(p_page_name,"","width="+p_width+",height="+p_height+",menubar=no,status=no,location=no,toolbar=no,scrollbars=yes,left="+winl+",top="+wint);
}

function slideshow(hidediv,showdiv,divname,totaldiv)
{
	change(hidediv,showdiv);
	if(divname == "fp")
	{
		var i=hidediv.substring(2);
		document.getElementById("fpb"+i).className= "fea_num_button";
		var i=showdiv.substring(2);
		document.getElementById("fpb"+i).className = "fea_num_button_hover";
		nextdiv = getnextdiv(showdiv,divname,totaldiv);
		sst = setTimeout("slideshow('"+showdiv+"','"+nextdiv+"','"+divname+"','"+totaldiv+"')",5000);
	}
	else
	{
		nextdiv = getnextdiv(showdiv,divname,totaldiv);
		sstmain = setTimeout("slideshow('"+showdiv+"','"+nextdiv+"','"+divname+"','"+totaldiv+"')",5000);
	}
}
function change(hidediv,showdiv)
{
	document.getElementById(hidediv).style.display = "none";
	document.getElementById(showdiv).style.display = "block";
}
function getnextdiv(currentdiv,divname,totaldiv)
{
	var i=currentdiv.substring(2);
	i = parseInt(i);
	if(i != totaldiv){i = i+1;}
	else{i = 1;}
	var divid = divname+i;
	return divid;
}

function showdiv(showdiv,totaldiv)
{
	for(i=1;i<=totaldiv;i++)
	{
		document.getElementById('fp'+i).style.display = "none";
		document.getElementById("fpb"+i).className= "fea_num_button";
	}
	var j=showdiv.substring(2);
	document.getElementById("fpb"+j).className = "fea_num_button_hover";
	document.getElementById(showdiv).style.display = "block";
	nextdiv = getnextdiv(showdiv,'fp',totaldiv);
	sst = setTimeout("slideshow('"+showdiv+"','"+nextdiv+"','fp',"+totaldiv+");",5000);
}
function scrollrow(totalrow,row,j,divid)
{
	for(i=0;i<row;i++)
	{
		k=(i+j)%totalrow;
		if(divid == "rp"){document.getElementById(divid+i).innerHTML=rparray[k];}
		else{document.getElementById(divid+i).innerHTML=offarray[k];}
	}
	j++;
	if(j==totalrow)
	{
		j=0;
	}
	if(divid == "rp"){
		document.getElementById("j1").value=j;rpt = setTimeout('scrollrow('+totalrow+','+row+','+j+',"'+divid+'")',2000);
	}else{
		document.getElementById("j2").value=j;offt = setTimeout('scrollrow('+totalrow+','+row+','+j+',"'+divid+'")',2000);
	}
}
function startscroll(divid)
{
	if(divid == "rp")
	{
		j = document.getElementById("j1").value;
		totalrp = document.getElementById("totalrp").value;
		rpt = setTimeout('scrollrow('+totalrp+','+6+','+j+',"'+divid+'")',500);
	}
	else
	{
		j = document.getElementById("j2").value;
		totaloff = document.getElementById("totaloff").value;
		offt = setTimeout('scrollrow('+totaloff+','+6+','+j+',"'+divid+'")',500);
	}
}

function fnToggelSearchCombo()
{
	if(document.search_frm.srh_by.value=='srh_byprod' || document.search_frm.srh_by.value=='srh_byoff')
	{
		document.getElementById('id_province').style.display='none';
		document.getElementById('id_srhtype').style.display='none';
		if(document.search_frm.srh_by.value=='srh_byprod')
		{
			document.getElementById('id_productwetype').style.display='';
			document.getElementById('id_cat').style.display='';
			document.getElementById('id_offertype').style.display='none';
			document.getElementById('id_offerfordays').style.display='none';
			/*if(document.search_frm.srh_webuytype.value=='b')
			{
				document.getElementById('id_cat').style.display='none';
				//document.getElementById('advance_srch').style.display='';
			}else
			{
				document.getElementById('id_cat').style.display='';
				//document.getElementById('advance_srch').style.display='none';
			}*/
		}else
		{
			//document.getElementById('advance_srch').style.display='';
			document.getElementById('id_cat').style.display='';
			document.getElementById('id_productwetype').style.display='none';
			document.getElementById('id_offertype').style.display='';
			document.getElementById('id_offerfordays').style.display='';
		}
		document.getElementById('id_cmpcountry').style.display='none';
	}
	if(document.search_frm.srh_by.value=='srh_bycomp')
	{
		document.getElementById('id_cat').style.display='none';
		document.getElementById('id_province').style.display='';
		document.getElementById('id_srhtype').style.display='';
		document.getElementById('id_productwetype').style.display='none';
		document.getElementById('id_offertype').style.display='none';
		document.getElementById('id_offerfordays').style.display='none';
		//document.getElementById('advance_srch').style.display='';	
		if(document.getElementById('srh_ctype').value=='' || document.getElementById('srh_ctype').value=='b')
		{
			document.getElementById('id_cmpcountry').style.display='';
			document.getElementById('srh_province_inr').style.display='none';
			document.getElementById('srh_province_inr').disabled=true;
			if(eval(document.getElementById('srh_province')))
			{
				document.getElementById('srh_province').style.display='none';
				document.getElementById('srh_province').disabled=false;	
			}
		}else
		{
			document.getElementById('id_cmpcountry').style.display='none';
			//document.getElementById('srh_province').style.display='none';
			document.getElementById('srh_province_inr').style.display='';
			document.getElementById('srh_province_inr').disabled=false;
			//document.getElementById('srh_province').disabled=true;
			if(eval(document.getElementById('srh_province')))
			{
				document.getElementById('srh_province').style.display='none';
				document.getElementById('srh_province').disabled=false;	
			}
		}
	}
}
function show_country_combo(cmptype)
{
	if(cmptype=='s')
	{
		document.getElementById('id_cmpcountry').style.display='none';
		document.getElementById('srh_province_inr').style.display='';
		document.getElementById('srh_province_inr').disabled=false;
		if(eval(document.getElementById('srh_province')))
		{
			document.getElementById('srh_province').style.display='none';
			document.getElementById('srh_province').disabled=false;	
		}
	}else
	{
		document.getElementById('id_cmpcountry').style.display='';
		document.search_frm.srh_country.options[0].selected = true;
		//alert(document.getElementById('id_cmpcountry').index[1]);
		document.getElementById('srh_province_inr').style.display='none';
		document.getElementById('srh_province_inr').disabled=true;
		if(eval(document.getElementById('srh_province')))
		{
			document.getElementById('srh_province').style.display='none';
			document.getElementById('srh_province').disabled=false;	
		}
		var countrycontent1=document.search_frm.srch_company_dropstart.value;
		var countrycontent2=document.search_frm.srch_company_dropend.value;
		if(cmptype=='b')
		{
			//document.getElementById('country_india').style.display="none";
			var countrycontent=document.search_frm.allcountryoption.value;
			document.getElementById('countrydorpdown').innerHTML=countrycontent1+countrycontent+countrycontent2;
		}else if(cmptype=='')
		{
			//document.getElementById('country_india').style.display='';
			var countrycontent=document.search_frm.indiacountryoption.value + document.search_frm.allcountryoption.value;
			document.getElementById('countrydorpdown').innerHTML=countrycontent1+countrycontent+countrycontent2;
		}
	}	
}
function get_all_provice(countryid,stateid,rootdir){

		//creare URL for Call to AJAX Server 
		var url = rootdir+"getcountry_state.php";
		url = url + "?countryid=" + countryid;
		url = url + "&stateid=" + stateid;
		executerequest(url);
}

// JavaScript Document
var xmlHttp;

function executerequest(url)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Your browser does not support AJAX!");
		return;
	} 
	if(url == "ajaxsearchcountries.php")
	{
		xmlHttp.onreadystatechange=stateChanged;
	}
	else
	{
		xmlHttp.onreadystatechange=stateChangedSearch;
	}
	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}

function stateChanged()
{
	if (xmlHttp.readyState==4)
	{
		//alert(trim(xmlHttp.responseText));
		document.getElementById("ajaxsearchcountries").innerHTML=xmlHttp.responseText;
	}
}

function stateChangedSearch()
{
	if (xmlHttp.readyState==4)
	{
		//alert(trim(xmlHttp.responseText));
		document.getElementById("ajaxsearch").innerHTML=xmlHttp.responseText;
		document.getElementById("ajaxsearch").style.display="block";
	}
}
function stateChangedcountry(){
	var selectdropdownbox_val='<select name="srh_province" style="width:145px;" disabled="disabled" id="srh_province"><option value="" selected="selected">All Provinces/States</option></select>';
	if( xmlHttp.readyState == 0 ){
		document.getElementById('country_state_combo').innerHTML = selectdropdownbox_val;
	}
	if( xmlHttp.readyState == 1 ){
		document.getElementById('country_state_combo').innerHTML = selectdropdownbox_val;
	}
	if( xmlHttp.readyState == 2 ){
		document.getElementById('country_state_combo').innerHTML = selectdropdownbox_val;
	}
	if( xmlHttp.readyState == 3 ){
		document.getElementById('country_state_combo').innerHTML = selectdropdownbox_val;
	}
	if( xmlHttp.readyState == 4 ){
		document.getElementById('country_state_combo').innerHTML='<select name="srh_province" style="width:145px;" id="srh_province"><option value="" selected="selected">All Provinces/States</option>' + xmlHttp.responseText + '</select>';
	}
}
function setvalue(val){
	document.getElementById('srh_keyword').value=trim(val);
	document.getElementById('ajaxsearch').style.display='none';
}

function ajaxsugetion(val,e){
	var keycode = checkKeycode(e);
	if(keycode != 40 && keycode != 38 && keycode != 13){
		if(val!=''){
			executerequest('ajaxsearch.php?keyword='+val+'&searchby='+document.getElementById('srh_by').options[document.getElementById('srh_by').selectedIndex].value);
		}else{
			document.getElementById('ajaxsearch').style.display='none';
		}
	}
}
function checkKeycode(e){
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	return keycode;
}
function sugmouseover(ele)
{
	var totalsug = document.getElementById("totalsug").value;
	for(var i=1;i<=totalsug;i++)
	{
		document.getElementById("sug"+i).className='';
	}
	ele.className='ajax_search_selected';
	document.getElementById("srh_keyword").focus();
}
function checksug(e)
{
	var keycode = checkKeycode(e);
	if(document.getElementById('ajaxsearch').style.display == 'block'){
		i = parseInt(document.getElementById("currentsug").value);
		if(keycode == 13){
			setvalue(document.getElementById("sug"+i).title);
			document.getElementById("substatus").value = "0";
		}else{
			var totalsug = document.getElementById("totalsug").value;
			if(keycode == 40){
				if(i==totalsug)i=1;
				else i++;
				document.getElementById("currentsug").value = i;
				sugmouseover(document.getElementById("sug"+i));
			}else if(keycode == 38){
				if(i==1 || i==0)i=totalsug;
				else i--;
				document.getElementById("currentsug").value = i;
				sugmouseover(document.getElementById("sug"+i));
			}
		}
	}	
}
function trim(str, chars){return ltrim(rtrim(str, chars), chars);}
function ltrim(str, chars){
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function rtrim(str, chars){
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
function makeus(rootdir)
{
	if (document.all){
		document.write('<a href="javascript:history.go(0);" onclick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\''+rootdir+'\');">');
		document.write('Make Us <img alt="Make Us" height="19" width="18" src="img/myhome.gif" border="0" style="vertical-align:middle;"/></a> | ');
	}else if (document.getElementById){
		document.write('<a href="'+rootdir+'" title="Drag this link onto your Home button to make us your Homepage."><b>Make Us </b><img src="img/myhome.gif" alt="Make Us" border="0" style="vertical-align:middle;" height="19" width="18"/></a> | ');
	}
}
/* marquee script */
function populate(){
	if (iedom){
		var initFill=(full==1)? '8px' : parseInt(marqueewidth)+8+"px"
		actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
		cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
		cross_marquee.style.left=initFill
		cross_marquee2=document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2
		cross_marquee2.innerHTML=cross_marquee.innerHTML=marqueecontent
		cross_marquee2.style.left=(parseInt(cross_marquee.style.left)+actualwidth+8)+"px" //indicates following #1
	}
	else if (document.layers){
		ns_marquee=document.ns_marquee.document.ns_marquee2
		ns_marquee.left=parseInt(marqueewidth)+8
		ns_marquee.document.write(marqueecontent)
		ns_marquee.document.close()
		actualwidth=ns_marquee.document.width
	}
	setTimeout('lefttime=setInterval("scrollmarquee()",30)',initPause)
}
function scrollmarquee(){
	if (iedom){
		if (parseInt(cross_marquee.style.left)<(actualwidth*(-1)+8))
		cross_marquee.style.left=(parseInt(cross_marquee2.style.left)+actualwidth+8)+"px"
		if (parseInt(cross_marquee2.style.left)<(actualwidth*(-1)+8))
		cross_marquee2.style.left=(parseInt(cross_marquee.style.left)+actualwidth+8)+"px"
		cross_marquee2.style.left=parseInt(cross_marquee2.style.left)-copyspeed+"px"
		cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
	}
	else if (document.layers){
	if (ns_marquee.left>(actualwidth*(-1)+8))
	ns_marquee.left-=copyspeed
	else
	ns_marquee.left=parseInt(marqueewidth)+8
	}
}
function iedomwrite(marqueewidth,marqueeheight)
{
				document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
				document.write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden">')
				document.write('<div style="position:absolute;width:'+marqueewidth+';height:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
				document.write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;display:inline;"></div>')
				document.write('<div id="iemarquee2" style="position:absolute;left:0px;top:0px;display:inline;"></div>')
				document.write('</div></div>')
				document.write('</td></table>')
}
function layerwrite(marqueewidth,marqueeheight)
{
	document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
	document.write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
	document.write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
	document.write('</ilayer>')
	document.write('</td></table>')
}
function initscroll()
{
	marqueecontent = '<nobr>'+marqueecontent+'</nobr>'
	document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
}
var viebreak='<p></p>'
function viedomwrite(vmarqueewidth,vmarqueeheight)
{
	document.write('<div style="position:relative;width:'+vmarqueewidth+';height:'+vmarqueeheight+';overflow:hidden" onMouseover="vcopyspeed=pausespeed" onMouseout="vcopyspeed=vmarqueespeed">')
	document.write('<div id="viemarquee" style="position:absolute;left:0px;top:0px;width:100%;text-align:justify;">')
	document.write('</div><div id="viemarquee2" style="position:absolute;left:0px;top:0px;width:100%;z-index:100;background:white;text-align:justify;">')
	document.write('</div></div>')
}
function vlayerwrite(vmarqueewidth,vmarqueeheight)
{
	document.write('<ilayer width='+vmarqueewidth+' height='+vmarqueeheight+' name="vns_marquee">')
	document.write('<layer name="vns_marquee2" width='+vmarqueewidth+' height='+vmarqueeheight+' left=0 top=0 onMouseover="vcopyspeed=pausespeed" onMouseout="vcopyspeed=vmarqueespeed"></layer>')
	document.write('</ilayer>')
}
function vpopulate(){
		if (iedom){
		var lb=document.getElementById&&!document.all? '' : viebreak
		vcross_marquee=document.getElementById? document.getElementById("viemarquee") : document.all.viemarquee
		vcross_marquee2=document.getElementById? document.getElementById("viemarquee2") : document.all.viemarquee2
		vcross_marquee.style.top=(vfull==1)? '8px' : parseInt(vmarqueeheight)+8+"px"
		vcross_marquee2.innerHTML=vcross_marquee.innerHTML=vmarqueecontent+lb
		actualheight=vcross_marquee.offsetHeight
		vcross_marquee2.style.top=(parseInt(vcross_marquee.style.top)+actualheight+8)+"px" //indicates following #1
		}
		else if (document.layers){
			vns_marquee=document.vns_marquee.document.vns_marquee2
			vns_marquee.top=parseInt(vmarqueeheight)+8
			vns_marquee.document.write(vmarqueecontent)
			vns_marquee.document.close()
			actualheight=vns_marquee.document.height
		}
		setTimeout('lefttime=setInterval("vscrollmarquee()",50)',vinitPause)
	}
	
	function vscrollmarquee(){
		if (iedom){
		if (parseInt(vcross_marquee.style.top)<(actualheight*(-1)+8))
		vcross_marquee.style.top=(parseInt(vcross_marquee2.style.top)+actualheight+8)+"px"
		if (parseInt(vcross_marquee2.style.top)<(actualheight*(-1)+8))
		vcross_marquee2.style.top=(parseInt(vcross_marquee.style.top)+actualheight+8)+"px"
		vcross_marquee2.style.top=parseInt(vcross_marquee2.style.top)-vcopyspeed+"px"
		vcross_marquee.style.top=parseInt(vcross_marquee.style.top)-vcopyspeed+"px"
		}
		else if (document.layers){
		if (vns_marquee.top>(actualheight*(-1)+8))
		vns_marquee.top-=vcopyspeed
		else
		vns_marquee.top=parseInt(vmarqueeheight)+8
		}
	}
	
	function search_keyword()
	{
		document.write('<input type="text" id="srh_keyword" name="srh_keyword" style="height:14px;font-size:11px;line-height:14px;vertical-align:top;width:120px;" onkeyup="ajaxsugetion(this.value,event);" onblur="setTimeout(\'document.getElementById(&quot;ajaxsearch&quot;).style.display=&quot;none&quot;;\',500)" onkeydown="checksug(event);" autocomplete="off"/>');
	}