
	function mediacns(pagename){
		mediacns_window=window.open(pagename,'mediacns_window','toolbar=no,location=no,borders=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=0,top=0,width=847,height=636');
	}


	function test(obj,msg) {
		  var regex = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
		  if (regex.test(obj.value))
		  {
			return true;
		  }
		  else{
			alert(msg);
			obj.focus();
			return false;
		  }
		}
	function checkint(obj,msg)
	{
	 if(isNaN(obj.value))
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}
	function checkempty(obj,msg)
	{
	 if(obj.value=="")
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}
	
	function checkequal(obj,obj1,msg)
	{
	 if(obj.value!==obj1.value)
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}


	function checkboxcheck(obj,msg)
	{
	 if(!obj.checked)
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}

	function restrictemail(obj,msg)
	{
	var hotmailobj = obj.value.match("hotmail.com");
	var yahooobj = obj.value.match("yahoo.com");
	var gmailobj = obj.value.match("gmail.com");
		
	if(hotmailobj || yahooobj || gmailobj)
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}


function checkemptysearch(obj,msg)
	{
	 if(obj.value<3)
	 {
	  alert(msg);
	  obj.focus();
	  return false;
	 }
	}


	function checkForm()
	{
		if (checkempty(document.con_form.name,"Please Enter Your Name")==false) return false;
		if (checkempty(document.con_form.country,"Please Enter Your Country")==false) return false;
		if (checkempty(document.con_form.city,"Please Enter Your City ")==false) return false;
		if (checkempty(document.con_form.tel,"Please Enter Your Telephone No.")==false) return false;
		if (test(document.con_form.email,"Please Enter a Valid Email Address")==false) return false;
		if (checkempty(document.con_form.scode,"Please Enter displayed Security Code")==false) return false;	
		
return true;
	}

	function checkdomregForm()
	{
		if (checkempty(document.con_form.name,"Please Enter Your Name")==false) return false;
		if (checkempty(document.con_form.country,"Please Enter Your Country")==false) return false;
		if (checkempty(document.con_form.city,"Please Enter Your City ")==false) return false;
		if (checkempty(document.con_form.tel,"Please Enter Your Telephone No.")==false) return false;
		if (test(document.con_form.email,"Please Enter a Valid Email Address")==false) return false;
		if (checkempty(document.con_form.scode,"Please Enter displayed Security Code")==false) return false;	

		if (checkboxcheck(document.con_form.check1,"You Must be agreed with Terms of Services & Privacy Policy to Proceed Next")==false) return false;	
		
return true;
	}

	function checksupportForm()
	{
		if (checkempty(document.support_form.name,"Please Enter Your Name")==false) return false;
		if (checkempty(document.support_form.country,"Please Enter Your Country")==false) return false;
		if (checkempty(document.support_form.city,"Please Enter Your City ")==false) return false;
		if (checkempty(document.support_form.tel,"Please Enter Your Telephone No.")==false) return false;
		if (test(document.support_form.email,"Please Enter a Valid Email Address")==false) return false;
		if (checkempty(document.support_form.scode,"Please Enter displayed Security Code")==false) return false;	
		return true;
	}



function check_search_Form()
	{
		if (checkempty(document.search_form.txtsearch,"Please Enter something to Search")==false) return false;

		return true;
	}



//------------------------------------
//------------------------------------

	function checkinvestorsForm()
	{
		if (checkempty(document.con_form.name,"Please Enter Your Name")==false) return false;
		if (checkempty(document.con_form.country,"Please Enter Your Country")==false) return false;
		if (checkempty(document.con_form.city,"Please Enter Your City ")==false) return false;
		if (checkempty(document.con_form.tel,"Please Enter Your Telephone No.")==false) return false;
		if (test(document.con_form.email,"Please Enter a Valid Email Address")==false) return false;
		if (restrictemail(document.con_form.email,"Qualikom Security System\n Found that you have entered hotmail.com OR yahoo.com OR gmail.com's Email Address \n We are sorry that Free Email Services Address Not allowed\n Please Enter Your Own Domain's Email Address")==false) return false;		
if (checkempty(document.con_form.scode,"Please Enter displayed Security Code")==false) return false;	

return true;
	}




	function checkloginForm()
	{

		if (checkempty(document.login_form.username,"Please Enter User ID")==false) return false;
	if (checkempty(document.login_form.userpass,"Please Enter Password")==false) return false;

if (checkempty(document.login_form.scode,"Please Enter displayed Security Code")==false) return false;	

	
return true;
	}
	
	
		function checkloginForm1()
	{

	if (checkempty(document.login_form1.username,"Please Enter User ID")==false) return false;
	if (checkempty(document.login_form1.userpass,"Please Enter Password")==false) return false;
	
return true;
	}



	function checksignupForm(){


		if (checkempty(document.signup_form.username,"Please Enter Login ID")==false) return false;
	if (checkempty(document.signup_form.userpass,"Please Enter Password")==false) return false;
	if (checkempty(document.signup_form.userpass1,"Please Re-enter Password")==false) return false;	
if (checkempty(document.signup_form.fname,"Please Enter Your First Name")==false) return false;
if (checkempty(document.signup_form.lname,"Please Enter Your Last Name")==false) return false;
		if (checkempty(document.signup_form.st_address,"Please Enter Your Address")==false) return false;
		if (checkempty(document.signup_form.city,"Please Enter Your City ")==false) return false;		
		if (checkempty(document.signup_form.state,"Please Enter Your State\n if not applicable enter N/A ")==false) return false;
if (checkempty(document.signup_form.country,"Please Enter Your Country")==false) return false;
		if (checkempty(document.signup_form.zipcode,"Please Enter Your ZIP Code ")==false) return false;
		if (checkempty(document.signup_form.tel,"Please Enter Your Telephone No.")==false) return false;
		if (test(document.signup_form.email,"Please Enter a Valid Email Address")==false) return false;


if (checkempty(document.signup_form.scode,"Please Enter displayed Security Code")==false) return false;	

	if (checkequal(document.signup_form.userpass,document.signup_form.userpass1,"Both Passwords didn't match")==false) return false;
	
//if (checkboxcheck(document.signup_form.check1,"You Must be agreed with Terms of Services & Privacy Policy to Proceed Next")==false) return false;

return true;
	}



function checkoutForm(){
if(!document.checkout_form.same_check.checked) {
	
	if (checkempty(document.checkout_form.ship_address,"Please Enter Shipping Address")==false) return false;
	if (checkempty(document.checkout_form.ship_city,"Please Enter Shipping City")==false) return false;
	if (checkempty(document.checkout_form.ship_state,"Please Shipping State")==false) return false;	
	if (checkempty(document.checkout_form.ship_country,"Please Enter Shipping Country")==false) return false;
	if (checkempty(document.checkout_form.ship_zipcode,"Please Enter Shipping Zip Code")==false) return false;
		
}		

			
if (checkempty(document.checkout_form.scode,"Please Enter displayed Security Code")==false) return false;	

return true;
	}
	

function mlistForm()
	{
		if (test(document.con_form.email,"Please Enter a Valid Email Address")==false) return false;
		return true;
	}
//--------------------------------------
//--------------------------------------


<!--
function animationdiv(id){
document.getElementById(id).style.visibility="visible"
}
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'none')
e.style.display = 'block';
else
e.style.display = 'none';
}
//-->

//------------------------------------------------
//IMAGE SWAPING SCRIPT STARTS


<!--
function FP_swapImgRestore() {//v1.0
 var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) {
  var elm=doc.$imgSwaps[i]; if(elm) { elm.src=elm.$src; elm.$src=null; } } 
  doc.$imgSwaps=null; }
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->



//IMAGE SWAPING SCRIPT ENDS
//-------------------------------------------------------



//SEARCH DIV OVERLAY SHOW/HIDE SCRIPT START FROM HERE
//-------------------------------------------------------


//Start Overlay Script



function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos+"px"
return false
}
else
return true
}



function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

//end overly script


function confirmlink(msg,links) {

var checkin = confirm(msg);
if(checkin) {
window.location = links;
}else {
return false;
}

}


//SEARCH DIV OVERLY SHOW/HIDE SCRIPT ENDS HERE
//------------------------------------------------------


//-----------------------------------------------------------
//DROP IN  OUT BOX SCRIPT
//-----------------------------------------------------------

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=32 //(must be divisible by 8)
var direction="up"

function initbox(targetbox){
if (!dom&&!ie&&!ns4)
return
//crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
crossobj=(dom)?document.getElementById(targetbox).style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
crossobj.top=scroll_top-245+calunits
crossobj.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin()",50)
}

function dropin(){
scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
if (parseInt(crossobj.top)<200+scroll_top)
crossobj.top=parseInt(crossobj.top)+40+calunits
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}

function bouncein(){
crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
}
}

function dismissbox(){
if (window.bouncestart) clearInterval(bouncestart)
crossobj.visibility="hidden"
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


//window.onload=initbox


//-----------------------------------------------------------
//END OF DROP IN  OUT BOX SCRIPT
//-----------------------------------------------------------


//-----------------------------------------------------------
// Toggle DIV functions
//-----------------------------------------------------------
<!--
function togglediv(id) {
var e = document.getElementById(id);
if(e.style.display == 'none') {
e.style.display = 'block';
}
else
{
e.style.display = 'none';
}
}
//-->

//-----------------------------------------------------------
// Toggle DIV functions
//-----------------------------------------------------------

function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


