 function unhideIframe()

        {

            if(ie)

            {

                var theIframe=document.getElementById("fadeboxiframe")

                if(theIframe != null)
                {
                    var theDiv=document.getElementById("dvregisterfrm");

                    theIframe.style.width=theDiv.offsetWidth+'px';

                    theIframe.style.height=theDiv.offsetHeight+'px';

                    theIframe.style.top=theDiv.offsetTop+'px';

                    theIframe.style.left=theDiv.offsetLeft+'px';

                    theIframe.style.display='';
                }

            }

        }

        function CalculateTop(Height)
        {var ScrollTop=document.body.scrollTop;if(ScrollTop==0)
            {if(window.pageYOffset)
                    ScrollTop=window.pageYOffset;else
                        ScrollTop=(document.body.parentElement)?document.body.parentElement.scrollTop:0;}
                //alert(document.body.clientHeight);
                //alert(window.innerHeight);
                //alert(document.documentElement.clientHeight);
                var BodyHeight=document.body.clientHeight;if(BodyHeight==0)
                {BodyHeight=window.innerHeight;}
                if(BodyHeight==0)
                {BodyHeight=document.documentElement.clientHeight}
                //alert(BodyHeight);
                //alert(ScrollTop);
                var myWidth = 0, myHeight = 0;
                if( typeof( window.innerWidth ) == 'number' ) {
                    //Non-IE
                    myWidth = window.innerWidth;
                    myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
                    //IE 6+ in 'standards compliant mode'
                    myWidth = document.documentElement.clientWidth;
                    myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                    //IE 4 compatible
                    myWidth = document.body.clientWidth;
                    myHeight = document.body.clientHeight;
                }

                var FinalTop=((myHeight-Height)/2)+ScrollTop;return FinalTop;}
            function CalculateLeft(Weight)
            {var ScrollLeft=document.body.scrollLeft;if(ScrollLeft==0)
                {if(window.pageXOffset)
                        ScrollLeft=window.pageXOffset;else
                            ScrollLeft=(document.body.parentElement)?document.body.parentElement.scrollLeft:0;}
                    var BodyWeight=document.documentElement.clientWidth;if(BodyWeight==0)
                    {BodyWeight=document.body.clientWidth;}
                    var FinalLeft=(BodyWeight+ScrollLeft-Weight)/2;return FinalLeft;}

                 function GetXmlHttpObject()
            {
                var xmlHttp=null;
                try
                {
                    xmlHttp=new XMLHttpRequest();
                }
                catch(e)
                {
                    try
                    {
                        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
                    }
                    catch(e)
                    {
                        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
                    }
                }
                return xmlHttp;
            }
            function ProcessLoader()
            {
                document.getElementById('dvprocessing').style.display = '';
            }
            function SetBackground()
            {

//                alert(GetBodyWidth());
                document.getElementById('dimmer').style.width=GetBodyWidth();

                document.getElementById('dimmer').style.height=GetBodyHeight();

                document.getElementById('dimmer').style.visibility="visible";

            }
            function unsetBackground()
            {
                document.getElementById('dimmer').style.width=0;
                document.getElementById('dimmer').style.height=0;
                document.getElementById('dimmer').style.visibility="";
            }
            function GetBodyWidth()
            {
                var theWidth=0;
                if(document.body)
                {
                    theWidth=document.body.clientWidth;
                }

                else if(document.documentElement&&document.documentElement.clientWidth)

                {

                    theWidth=document.documentElement.clientWidth;

                }

                else if(window.innerWidth)

                {

                    theWidth=window.innerWidth;

                }
                //if(navigator.appName != "Microsoft Internet Explorer")
                //{
                    theWidth=theWidth-80;
                //}


                return theWidth+ "px";

            }
            function GetBodyHeight()

            {

                var theHeight1=0;

                var theHeight2=0;

                var theHeight3=0;

                if(window.innerHeight)

                {

                    theHeight1=window.innerHeight;

                }

                if(document.documentElement&&document.documentElement.clientHeight)

                {

                    theHeight2=document.documentElement.clientHeight;

                }

                if(document.body)

                {

                    theHeight3=document.body.clientHeight;
                    isMozilla=(document.all)?0:1;

                    if(isMozilla)

                    {

                        theHeight4=0;

                    }

                    else

                    {

                        theHeight4=document.body.scrollHeight;

                    }

                }

                FinalHeight=Math.max(theHeight1,theHeight2,theHeight3,theHeight4);

                if(navigator.appName != "Microsoft Internet Explorer")
                    {
                         FinalHeight=FinalHeight-85;
                    }


                return FinalHeight+ "px";

            }
function newsletterajaxfunction()
            {
                //var testresults;
                var str=document.getElementById('txtnlemail').value;
                /*var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
                if (filter.test(str))
                    testresults=true
                else{

                    testresults=false
                }
                
                if(testresults==false)
                {
                    alert('Please Enter Valid Email Address');
                    document.getElementById('txtnlemail').focus();
                    return false;
                }*/
                xmlHttp=GetXmlHttpObject();
                if(xmlHttp==null)
                {
                    alert("Browser does not support HTTP Request");
                    return false;
                }
                var url="newslettersignup.php?email="+str;
                //alert(url);
                xmlHttp.onreadystatechange= stateChangenewsletterajaxfunction;
                xmlHttp.open("GET",url,true);
                xmlHttp.send(null);
            }
            function stateChangenewsletterajaxfunction()
            {

                SetBackground();
                //alert(xmlHttp.readyState);
//                alert(xmlHttp.responseText);
                if(xmlHttp.readyState==1)
                {
                    ProcessLoader();
                }
                if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))
                {
                    var popuph = 200;
                    var popupw = 360;
                    var popuph2 = popuph/2;
                    var popupw2 = popupw/2;
                    var winW = screen.width;
                    var winH = screen.height;
                    if (parseInt(navigator.appVersion)>3) {
                        if (navigator.appName=="Netscape") {

                            winW = document.body.offsetWidth;
                            winH = document.body.offsetHeight;
                        }
                        if (navigator.appName.indexOf("Microsoft")!=-1) {
                            winW = document.body.offsetWidth;
                            winH = document.body.offsetHeight;

                        }

                    }

                    var sh = winH;
                    var sw = winW;
                    var sh2 = sh/2;
                    var sw2 = sw/2;

                    var topf = sh2 - popuph;
                    var leftf = sw2 - popupw2;

                    document.getElementById('dvprocessing').style.display='none';
//                    document.getElementById('dvregisterfrm').style.display='';
//                    document.getElementById('dvregisterfrm').style.top=CalculateTop('430')+ "px";
//                    document.getElementById('dvregisterfrm').style.left= CalculateLeft('430')+ "px";/**/
//                    document.getElementById("dvregisterfrm").innerHTML="";
//                    unhideIframe();
                    document.getElementById('dimmer').style.width=0;
                    document.getElementById('dimmer').style.height=0;
                    document.getElementById('dimmer').style.visibility="hidden";
					if(xmlHttp.responseText == "false")
						alert("You have already signed up for newsletter");
					else
						document.getElementById('icpsignup5845').submit();
                    //alert(xmlHttp.responseText);
					//location.href = 'thankyou.php?page=signup';
                }
            }
function setmessage_newsletter(msg)
{
   /*if(document.getElementById('txtnlemail').value=="" || document.getElementById('txtnlemail').value==msg)
    {
        document.getElementById('txtnlemail').value = msg;
    }*/
	if(document.getElementById('txtnlemail').value == "")
	{
		document.getElementById('txtnlemail').value = msg;
	}
	
}
function unsetmessage_newsletter(msg)
{
   /* if(document.getElementById('txtnlemail').value!="" || document.getElementById('txtnlemail').value!=msg)
    {
        document.getElementById('txtnlemail').value = "";
    }*/
	if(document.getElementById('txtnlemail').value == msg && document.getElementById('txtnlemail').value != "")
	{
		document.getElementById('txtnlemail').value = "";
	}
}
function request_a_quote_ajaxfunction()
            {
                var testresults;
                var str=document.getElementById('txtrapemail').value;
                var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
                if (filter.test(str))
                    testresults=true
                else{

                    testresults=false
                }
                if(document.getElementById('txtrapname').value=="")
                {
                    alert('Please Enter The Name');
                    document.getElementById('txtrapname').focus();
                    return false;
                }
                if(testresults==false)
                {
                    alert('Please Enter Valid Email Address');
                    document.getElementById('txtrapemail').focus();
                    return false;
                }
                if(document.getElementById('txtrapmsg').value=="")
                {
                    alert('Please Enter The Message');
                    document.getElementById('txtrapmsg').focus();
                    return false;
                }
                if(document.getElementById('txtimage_quote').value!=document.getElementById('hdnpinvaluequote').value)
                {
                    alert('Please Enter The Given Code Correctly');
                    document.getElementById('txtimage_quote').focus();
                    return false;
                }
                xmlHttp=GetXmlHttpObject();
                if(xmlHttp==null)
                {
                    alert("Browser does not support HTTP Request");
                    return;
                }
				
				
				   var sel = document.getElementById("cboInterest");
				   var selintrest = new Array(); 
				   var selval = new Array();
				   var count = 0;
				   for (var i = 0; i < sel.options.length; i++) 
				    { 
					   if (sel.options[ i ].selected==true) 
						{
						     selintrest[count] = sel.options[i].value;
						  count++;
						}
					}
					//alert(selintrest);
				
			
                var url="requestquote.php?name="+document.getElementById('txtrapname').value;
				
                url += "&email="+document.getElementById('txtrapemail').value;
                url += "&msg="+document.getElementById('txtrapmsg').value;
				url += "&intrested="+selintrest;
	
                xmlHttp.onreadystatechange= stateChangerequestquoteajaxfunction;
                xmlHttp.open("GET",url,true);
                xmlHttp.send(null);
            }
            function stateChangerequestquoteajaxfunction()
            {

                SetBackground();
                //alert(xmlHttp.readyState);
//                alert(xmlHttp.responseText);
                if(xmlHttp.readyState==1)
                {
                    ProcessLoader();
                }
                if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))
                {
                    var popuph = 200;
                    var popupw = 360;
                    var popuph2 = popuph/2;
                    var popupw2 = popupw/2;
                    var winW = screen.width;
                    var winH = screen.height;
                    if (parseInt(navigator.appVersion)>3) {
                        if (navigator.appName=="Netscape") {

                            winW = document.body.offsetWidth;
                            winH = document.body.offsetHeight;
                        }
                        if (navigator.appName.indexOf("Microsoft")!=-1) {
                            winW = document.body.offsetWidth;
                            winH = document.body.offsetHeight;

                        }

                    }

  // alert('sdf');
                    var sh = winH;
                    var sw = winW;
                    var sh2 = sh/2;
                    var sw2 = sw/2;

                    var topf = sh2 - popuph;
                    var leftf = sw2 - popupw2;

                    document.getElementById('dvprocessing').style.display='none';
//                    document.getElementById('dvregisterfrm').style.display='';
//                    document.getElementById('dvregisterfrm').style.top=CalculateTop('430')+ "px";
//                    document.getElementById('dvregisterfrm').style.left= CalculateLeft('430')+ "px";/**/
//                    document.getElementById("dvregisterfrm").innerHTML="";
//                    unhideIframe();
                    document.getElementById('dimmer').style.width=0;
                    document.getElementById('dimmer').style.height=0;
                    document.getElementById('dimmer').style.visibility="hidden";
//                    alert(xmlHttp.responseText);
					
					alert("Thank you for requesting proposal. We will back to you soon.");
					
					// clear the form and close after sending mail
					document.rightrequestquote.reset();
					closeSlidePanel('formElement');
                }
            }
function check_enter_key(e)
{
    var enter_pressed = 0;//assume enter not pressed
    var key;
    var keychar;
    var reg;
    var _dom = 0;
    _dom=document.all?3:(document.getElementById?1:(document.layers?2:0));
    if(document.all) e=window.event; // for IE


    //this is code for enter key
    if(_dom==2){                     // for NN4
        //alert(e.which);
        if(e.which>0) ch='('+String.fromCharCode(e.which)+')';
        KeyID=e.which;
    }
    else
    {
        if(_dom==3){                   // for IE
            KeyID = (window.event) ? event.keyCode : e.which;
            if(KeyID==13)
            {
                enter_pressed = 1;
            }
        }
        else {                       // for Mozilla

            if(e.charCode>0) ch='('+String.fromCharCode(e.charCode)+')';
            KeyID=e.charCode;
            var key__for_mozilla =e.keyCode;
            // alert(key_try);

            if(key__for_mozilla==13)
            {
                enter_pressed = 1;
            }
        }
    }
    //alert(enter_pressed);
    if(enter_pressed == 1)
    {
        document.getElementById('submitbuttonforquote').click();
        //addRow('tbllist','2');
        return false;
    }
    return true;
    //alert(key);
    //keychar = String.fromCharCode(key);
    //reg = /\d/;
    //reg = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    //reg = /^[a-zA-Z\s\'?\b]+$/;

    //regPhone = /\d\d\d\-?\d\d\d\-?\d\d\d\d/;


    //return reg.test(keychar);
}
function check_enter_key_for_newsletter(e)
{
    var enter_pressed = 0;//assume enter not pressed
    var key;
    var keychar;
    var reg;
    var _dom = 0;
    _dom=document.all?3:(document.getElementById?1:(document.layers?2:0));
    if(document.all) e=window.event; // for IE


    //this is code for enter key
    if(_dom==2){                     // for NN4
        //alert(e.which);
        if(e.which>0) ch='('+String.fromCharCode(e.which)+')';
        KeyID=e.which;
    }
    else
    {
        if(_dom==3){                   // for IE
            KeyID = (window.event) ? event.keyCode : e.which;
            if(KeyID==13)
            {
                enter_pressed = 1;
            }
        }
        else {                       // for Mozilla

            if(e.charCode>0) ch='('+String.fromCharCode(e.charCode)+')';
            KeyID=e.charCode;
            var key__for_mozilla =e.keyCode;
            // alert(key_try);

            if(key__for_mozilla==13)
            {
                enter_pressed = 1;
            }
        }
    }
    //alert(enter_pressed);
    if(enter_pressed == 1)
    {
        verifyRequired5845();
        //addRow('tbllist','2');
        return false;
    }
    return true;
    //alert(key);
    //keychar = String.fromCharCode(key);
    //reg = /\d/;
    //reg = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    //reg = /^[a-zA-Z\s\'?\b]+$/;

    //regPhone = /\d\d\d\-?\d\d\d\-?\d\d\d\d/;


    //return reg.test(keychar);
}

var glb_videofilepath = null;
function funpopupvideo(videofilepath)

{

    xmlHttp=GetXmlHttpObject()

    if(xmlHttp==null)

    {

    alert("Browser does not support HTTP Request")

    return

    }
    glb_videofilepath = videofilepath;
    var url="videopopup.html";
    xmlHttp.onreadystatechange= stateChangevideopopup

    xmlHttp.open("GET",url,true)

    xmlHttp.send(null)

}


var glb_videofilepath = null;

function funYoutube_videotest(vidoeId)
{
	//document.getElementById('lbCloseLink').click();
	document.getElementById('video-testimonial-border2').style.visibility = '';
	
	xmlHttp=GetXmlHttpObject()

    if(xmlHttp==null)

    {

    alert("Browser does not support HTTP Request")

    return

    }
	
    var url="videopopup.php?vidoeId="+vidoeId;
   xmlHttp.onreadystatechange= stateChangevideopopupYouTube1

    xmlHttp.open("GET",url,true)

    xmlHttp.send(null)
	

}

function stateChangevideopopupYouTube1()
{
	   //SetBackground();
   
	   
    if(xmlHttp.readyState==1)
    {
		ProcessLoader();
    }

    if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))
    {
   
		var popuph = 540;
		var popupw = 600;
		
		var popuph2 = popuph/2;
		var popupw2 = popupw/2;
		
		var winW = screen.width;
		//alert(winW);	
		var winH = screen.height;
		//alert(winH);
		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
		}
		var sh = winH;
		var sw = winW;
		
		var sh2 = sh/2;
		var sw2 = sw/2;
		var topf1 = sh2 - popuph;
		var leftf1 = sw2 - popupw2;
        document.getElementById('dvprocessing').style.display='none';
        document.getElementById('dvregisterfrm').style.display='';
        document.getElementById('dvregisterfrm').style.top=CalculateTop('540')+ "px";
        document.getElementById('dvregisterfrm').style.left=leftf1 + "px";
		
        document.getElementById("video-testimonial-border2").innerHTML = xmlHttp.responseText;
       // alert(xmlHttp.responseText);
		
		 
        //alert('hello');
        //unhideIframe();
    }
	
}


function funYoutube(vidoeId)
{
	xmlHttp=GetXmlHttpObject()

    if(xmlHttp==null)

    {

    alert("Browser does not support HTTP Request")

    return

    }
	
    var url="videopopup.php?vidoeId="+vidoeId;
   xmlHttp.onreadystatechange= stateChangevideopopupYouTube

    xmlHttp.open("GET",url,true)

    xmlHttp.send(null)
	

}

function funpopupartwork(artworkfilepath)
{
    //alert(artworkfilepath);
    xmlHttp=GetXmlHttpObject()
    if(xmlHttp==null)
    {
    alert("Browser does not support HTTP Request")
    return
    }
    var url="artwork.php";
	//alert ('hi');
    xmlHttp.onreadystatechange= stateartworkdownload;
    xmlHttp.open("GET",url,true)
	//alert ('hi');
    xmlHttp.send(null)
}

function funpopupdownload(filepath)
{
  // alert ('hi');
    xmlHttp=GetXmlHttpObject()
    if(xmlHttp==null)
    {
    alert("Browser does not support HTTP Request")
    return
    }
   // glb_videofilepath = videofilepath;
	//alert ('hi1');
    var url="downloadtemplate.php";
    xmlHttp.onreadystatechange= stateartworkdownload
    xmlHttp.open("GET",url,true)
	//alert ('hi');
    xmlHttp.send(null)
}

function stateartworkdownload()
{
    SetBackground();
    if(xmlHttp.readyState==1)
    {
		ProcessLoader();
    }

    if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))
    {

		var popuph = 560;
		var popupw = 560;
		var popuph2 = popuph/2;
		var popupw2 = popupw/2;
		var winW = screen.width;
		var winH = screen.height;
		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
		}
		var sh = winH;
		var sw = winW;
		//alert(sh);
		//alert(sw);
		var sh2 = sh/2;
		var sw2 = sw/2;
		var topf1 = sh2 - popuph;
		var leftf1 = sw2 - popupw2;
        document.getElementById('dvprocessing').style.display='none';
        document.getElementById('dvregisterfrm').style.display='';
        document.getElementById('dvregisterfrm').style.top=CalculateTop('540')+ "px";
        document.getElementById('dvregisterfrm').style.left=leftf1 + "px";
        document.getElementById("dvregisterfrm").innerHTML=xmlHttp.responseText;
        //unhideIframe();
		
		
    }
}

function stateChangevideopopupYouTube()
{

    SetBackground();
    if(xmlHttp.readyState==1)
    {
		ProcessLoader();
    }

    if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))
    {
   
		var popuph = 540;
		var popupw = 400;
		var popuph2 = popuph/2;
		var popupw2 = popupw/2;
		
		var winW = screen.width;
		//alert(winW);	
		var winH = screen.height;
		//alert(winH);
		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
		}
		var sh = winH;
		var sw = winW;
		
		var sh2 = sh/2;
		var sw2 = sw/2;
		var topf1 = sh2 - popuph;
		var leftf1 = sw2 - popupw2;
        document.getElementById('dvprocessing').style.display='none';
        document.getElementById('dvregisterfrm').style.display='';
        document.getElementById('dvregisterfrm').style.top=CalculateTop('540')+ "px";
        document.getElementById('dvregisterfrm').style.left=leftf1 + "px";
		
        document.getElementById("dvregisterfrm").innerHTML = xmlHttp.responseText;
      //  alert(xmlHttp.responseText);
		
		 
        //alert('hello');
        //unhideIframe();
    }
}




function stateChangevideopopup()

{

    SetBackground();

    if(xmlHttp.readyState==1)

    {

		ProcessLoader();

    }

    if((xmlHttp.readyState==4||xmlHttp.readyState=="complete")&&(xmlHttp.status==200))

    {

		var popuph = 540;
		var popupw = 560;
		var popuph2 = popuph/2;
		var popupw2 = popupw/2;
		var winW = screen.width;
		var winH = screen.height;
		if (parseInt(navigator.appVersion)>3) {
			if (navigator.appName=="Netscape") {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
			if (navigator.appName.indexOf("Microsoft")!=-1) {
				winW = document.body.offsetWidth;
				winH = document.body.offsetHeight;
			}
		}
		var sh = winH;
		var sw = winW;
		var sh2 = sh/2;
		var sw2 = sw/2;
		var topf1 = sh2 - popuph;
		var leftf1 = sw2 - popupw2;
        document.getElementById('dvprocessing').style.display='none';
        document.getElementById('dvregisterfrm').style.display='';
        document.getElementById('dvregisterfrm').style.top=CalculateTop('540')+ "px";
        document.getElementById('dvregisterfrm').style.left=leftf1 + "px";
        document.getElementById("dvregisterfrm").innerHTML=xmlHttp.responseText;
        //alert(glb_videofilepath);
        var so = new SWFObject("player.swf", "someSWF", "540", "400", "9", "#E8E8E8");
        so.addVariable("vidURL", glb_videofilepath);
        so.write("dynamicvideodiv");
        unhideIframe();
    }
}
var ie = document.all;
var nn6 = document.getElementById &&! document.all;
//alert(nn6);
var isdrag = false;
var x, y;
var dobj;

function movemouse( e ) {
	//alert('yes');
	//alert(isdrag);
  if( isdrag ) {
	 // alert(ie);
	 //alert(tx + e.clientX - x);
    dobj.style.left = nn6 ? tx + e.clientX - x + "px" : tx + event.clientX - x + "px";
    dobj.style.top  = nn6 ? ty + e.clientY - y + "px" : ty + event.clientY - y + "px";
	//alert(dobj.style.left);
	//alert(tx + e.clientX - x);
	if(ie)
	{
		dobj12.style.left = nn6 ? tx12 + e.clientX - x : tx + event.clientX - x;
    	dobj12.style.top  = nn6 ? ty12 + e.clientY - y : ty12 + event.clientY - y;
		//alert(dobj12.style.left);
	}
    return false;
  }
}

function selectmouse( e ) {
  var fobj       = nn6 ? e.target : event.srcElement;
  var topelement = nn6 ? "HTML" : "BODY";
  //alert(fobj.parentElement);
  if(fobj.parentElement == null ) { } else {

	  while (fobj.tagName != topelement && fobj.className != "dragme") {
		  //alert(fobj.parentElement);
		fobj = nn6 ? fobj.parentNode : fobj.parentElement;
	  }
  }

	  if (fobj.className=="dragme") {

		isdrag = true;
		dobj = document.getElementById("dvregisterfrm");
		//alert(dobj);
		tx = parseInt(dobj.style.left+0);
		ty = parseInt(dobj.style.top+0);

		x = nn6 ? e.clientX : event.clientX;
		y = nn6 ? e.clientY : event.clientY;
		//alert(x);
		if(ie)
		{

            dobj12 = document.getElementById("fadeboxiframe");
            if(dobj12 != null)
			{
			tx12 = parseInt(dobj12.style.left+0);
			ty12 = parseInt(dobj12.style.top+0);
			x = nn6 ? e.clientX : event.clientX;
			y = nn6 ? e.clientY : event.clientY;
            }
		}

		document.onmousemove=movemouse;
		return false;
	  }
}

function styledPopupClose()
{
  document.getElementById("dvregisterfrm").innerHTML = "";
  document.getElementById("dvregisterfrm").style.display = "none";
  document.getElementById('dimmer').style.visibility = 'hidden';

  hideIframe();
}


function styledPopupClose1()
{
  document.getElementById("dvregisterfrm").innerHTML = "";
  document.getElementById("dvregisterfrm").style.display = "none";
 // document.getElementById('video-testimonial-border2').style.visibility = 'hidden';
  
  document.getElementById('dispvideo').style.visibility = '';
  
  hideIframe();
}



document.onmousedown=selectmouse;
document.onmouseup=new Function("isdrag=false");

function body_onkeydown(evt)
{
    var key=(window.event) ? event.keyCode : evt.which;
    //alert(key);
    if(key==27)
    {
    styledPopupClose();
    }
}


function gototop()
{
   window.scrollTo(0,300); 
   return false; 
}


function videoopen(id)
{
	document.location="video_testimonial.php?intglcode="+id;
	return true;
}