function submitForm(form1,idval,inNewWindow)
{
	if(inNewWindow)
		window.open(form1.action,form1.target,"height=480,width=440, resizable=no, scrollbars=yes");
	form1.id.value=idval;
	
	form1.submit();
}

function submitFormHomePod(form1,idval,inNewWindow)
{
	if(inNewWindow)
		window.open("scripts/send_pod.php?id="+idval,"EmailPod","height=480,width=440, resizable=no, scrollbars=yes");
}


/*function Expandbox(id)
{
	document.getElementById(id).style.display='';
}*/

function VaildateSendForm(form1)
{
	

	if(form1.txt_relayemail_main.value=="")
	{
		alert("Please Enter Recipient's Email");
		form1.txt_relayemail_main.focus();
		return false;
	}

	if(!validateEmail(form1.txt_relayemail_main.value))
	{
		alert("Please Enter Valid  Email");
		form1.txt_relayemail_main.focus();
		form1.txt_relayemail_main.select();
		return false;
	}

	if(form1.txt_fromname.value=="")
	{
		alert("Please Enter Sender's Name");
		form1.txt_fromname.focus();
		
		return false;
	}

	if(form1.txt_fromemail.value=="")
	{
		alert("Please Enter Sender's Email");
		form1.txt_fromemail.focus();
	
		return false;
	}
	
	if(!validateEmail(form1.txt_fromemail.value))
	{
		alert("Please Enter Valid Email");
		form1.txt_fromemail.focus();
		form1.txt_fromemail.select();
		return false;
	}

	return true;
}



function showpopup()
 {
	var newWindow=window.open('scripts/send_blog.php','EmailBlog','height=460,width=460, resizable=no, scrollbars=no');
 }
 
 function showpopupVideo()
 {
	var newWindow=window.open('scripts/send_video.php','EmailBlog','height=460,width=460, resizable=no, scrollbars=no');
 } 
 
 function showylccpop()
 {
 	var newWindow1=window.open('scripts/send_ylcc.php','EmailYlcc','height=460,width=460, resizable=no, scrollbars=no');
	
 }
 
function showcomments(blog_id)
{	
	var newWindow=window.open('scripts/ic_blog_comment.php?id='+blog_id,'EmailBlog','height=600,width=800, resizable=no, scrollbars=yes');
}
function showpollcomments(poll_id)
{	
	var newWindow=window.open('scripts/ic_poll_comment.php?id='+poll_id,'EmailPoll','height=600,width=800, resizable=no, scrollbars=yes');
}
function showvideocomments(voxant_id)
{	
	var newWindow=window.open('scripts/ic_video_comment.php?id='+voxant_id,'VideoComments','height=600,width=800, resizable=no, scrollbars=yes');
}

 function addfav()
   {
	  if (document.all)
      {
      window.external.AddFavorite
      ("http://www.holistics.com.au","Holistics");
	  return false;
      }
   }

function makeHome(obj) {

   obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.holistics.com.au');
}

/////////////////////////Code for getting shopping cart Details ////////////////////////////
	
	var xmlHttpAJAXDetails = false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)try {  
	xmlHttpAJAXDetails = new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch (e) {  
	try {    
	xmlHttpAJAXDetails = new ActiveXObject("Microsoft.XMLHTTP");
	  }
	   catch (e2) {    
	   xmlHttp = false;  
	  }
	  }@end @*/
	  if (!xmlHttpAJAXDetails && typeof XMLHttpRequest != 'undefined') {
	  	  xmlHttpAJAXDetails = new XMLHttpRequest();
	  }
	
	function callAjaxSC(pid,size,d) {  
	 	//alert(pid+"\n"+d+"\n");
	   if ((pid == null) || (pid == "")) return;  
	     var ran_unrounded=Math.random()*100000;
		var ran_number=Math.floor(ran_unrounded); 
		var url = seo_domain+"scripts/add2sc.php?pId="+escape(pid)+"&size=" +size+"&typ=" +escape(d)+"&Fol=" +imgFol+"&s=" +ran_number;
		 //alert(url);
		  xmlHttpAJAXDetails.open("GET", url, true);  
		  xmlHttpAJAXDetails.onreadystatechange = updSCBox;
		  xmlHttpAJAXDetails.send(null);
	}
	
	function updSCBox() {  
	  if (xmlHttpAJAXDetails.readyState == 4) {  
	  	var response = xmlHttpAJAXDetails.responseText;
		//alert(response);
		var getSC	=	response.split("^");
		//alert(getSC[0]);
		if(getSC[1]	==	'S'){
			//alert("Success");
			parent.document.getElementById("divShowSC").innerHTML=getSC[0];
			runEffect('Shake', 'divShowSC', {duration: 100},'');
		}
		else if(getSC[1]	==	'F'){
			parent.document.getElementById("divShowSC").innerHTML="";
		}
		else if(getSC[1]	==	'A'){
			parent.document.getElementById("divShowSC").innerHTML=getSC[0];
			//runEffect('Shake', 'divShowSC', {duration: 800},'');
		}
		
	  }
	}
	
	
	function chkDiv(){
		var g	=	document.getElementById("divShowSC").innerHTML;
		if(g	==	'')
			callAjaxSC('0','0','S');
			
			prodcheck();
			
	}