

function Show(id){
	//alert(id);
	document.getElementById(id).style.visibility="visible";
	document.getElementById(id).style.display="block";
	lastid = id;
}
function Hide(id){
	document.getElementById(id).style.visibility="hidden";
	document.getElementById(id).style.display="none";
	lastid = id;
}


function WYSIWYGtextareaCountChar(str, field)
{
	 var charCnt=str.length + " characters";
	 document.getElementById(field).value=charCnt;

}



function playAudio(embed){
	var soundobj=document.getElementById(embed);
	soundobj.Play();
}

function stopAudio(embed){
	var soundobj=document.getElementById(embed);
	soundobj.Stop();
}






var lastMenuid="voidLayer";
var dropCount=0;

function ShowMenu(id){
	//alert(id);
	document.getElementById(id).style.visibility="visible";
	document.getElementById(id).style.display="block";
	lastMenuid = id;
	dropCount++;
}
function HideMenu(id){
	document.getElementById(id).style.visibility="hidden";
	document.getElementById(id).style.display="none";
	lastMenuid = id;
	dropCount = dropCount -1 ;
}


function checkMenuCount(){
	if(dropCount>0){
		HideMenu(lastMenuid);
	}
}



function ClearDIV(id){
	document.getElementById(id).innerHTML=" ";
}

function ClearValue(id){
	document.getElementById(id).value=" ";
}

//function getValue(id){
//	return document.getElementById(id).value;
//}

function getInnerHTML(id){
	return document.getElementById(id).innerHTML;
}

function getInnerHTMLtoVar(id){
	var gHTML = document.getElementById(id).innerHTML;
}



function showWorking(id){
	
	document.getElementById(id).innerHTML="<center><br/><br/><span style='color:#C0C0C0'>Processing...</span><br/><br/><img src='images/gear1.gif'></center>";
}

function resetConfirmation(id){
		setTimeout("document.getElementById('"+id+"').innerHTML='';", 2000);
}

function resetConfirmReloadSiteLinks(id){
		setTimeout("document.getElementById('"+id+"').innerHTML='';", 2000);
		setTimeout("NuntiusAjax.Request('storelinks.linkForm', ' ', 'returnDiv', 0, 0);", 2000);
}

function statusChangePending(id){
	//$line.="	alert(id+'row');";
	document.getElementById(id+'row').style.backgroundColor='#990000';	
}


function popShip(){
		var pmt_first_name=document.getElementById('pmt_first_name').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_first_name|'+pmt_first_name+',id=1', 'ownerInfoReturnDIV',0,0);
		var pmt_last_name=document.getElementById('pmt_last_name').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_last_name|'+pmt_last_name+',id=1', 'ownerInfoReturnDIV',0,0);
		var pmt_middle_name=document.getElementById('pmt_middle_name').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_middle_name|'+pmt_middle_name+',id=1', 'ownerInfoReturnDIV',0,0);
		var pmt_address=document.getElementById('pmt_address').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_address|'+pmt_address+',id=1', 'ownerInfoReturnDIV',0,0);
		var pmt_city = document.getElementById('pmt_city').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_city|'+pmt_city+',id=1', 'ownerInfoReturnDIV',0,0);		
		var pmt_state = document.getElementById('pmt_state').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_state|'+pmt_state+',id=1', 'ownerInfoReturnDIV',0,0);
		var pmt_zip= document.getElementById('pmt_zip').value;
		NuntiusAjax.Request('SimpleQuery.queryUpdate', 'tbl_siteinfo,ship_zip|'+pmt_zip+',id=1', 'ownerInfoReturnDIV',0,0);		
		
		//var pmt_phone = document.getElementById('contact_phone').value;
		//var pmt_email = document.getElementById('pmt_email').value;
		document.getElementById('ship_first_name').value=pmt_first_name;
		document.getElementById('ship_last_name').value=pmt_last_name;
		document.getElementById('ship_middle_name').value=pmt_middle_name;
		document.getElementById('ship_address').value=pmt_address;
		document.getElementById('ship_city').value=pmt_city;
		document.getElementById('ship_state').value=pmt_state;
		document.getElementById('ship_zip').value=pmt_zip;
	}



	//Sign-up Specific

function checkState(state){
	
	if(state=="other"){
		//alert(state);
		document.getElementById('provinceDIV').innerHTML="<input type='text' id='state' name='state' value='state'>";
	}
		
}