﻿function moltadesigners()
{
popupWin = window.open('http://www.moltadesigners.com/','open_window','status, scrollbars, resizable, dependent=no, width=640, height=480, left=0, top=0');
}

function pause(marqueeObj)
{
document.getElementsByTagName(marquee).scrolldelay="100000000";
marqueeObj.scrolldelay="0";
}
function play(marqueeObj)
{
marqueeObj.scrolldelay="200";
}


function popupCheck(elementId)
{
 
 var objControl=document.getElementById(elementId);
    
     if(objControl !=null)
     {
//          var height=window.innerHeight+'px';
//          var width=window.innerWidth+'px';

          var height=document.getElementsByTagName('body')[0].clientHeight+'px';
          var width=document.getElementsByTagName('body')[0].clientWidth+'px';

         document.getElementById
          objControl.style.height= height;
          objControl.style.width= width;
   }
   
 document.getElementById(elementId).style.display="block";
 
 }
 
 function centeralign(objid)
 {
 
 var objControl=document.getElementById(objid);
 
 if(objControl !=null)
     {
//          var height=window.innerHeight+'px';
//          var width=window.innerWidth+'px';

//          var top=((window.innerHeight/2)-(objControl.style.height/2))+'px';
//          var left=((window.innerWidth/2)-(objControl.style.width/2))+'px';
          
//           var top=((window.innerHeight/2)-(objControl.clientHeight/2))+'px';
//          var left=((window.innerWidth/2)-(objControl.clientWidth/2)+objControl.offsetParent.scrollLeft)+'px';

if (window.innerWidth)
 	theWidth=window.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
	 theWidth=document.documentElement.clientWidth;
else if (document.body)
 	theWidth=document.body.clientWidth;
 
if (window.innerHeight)
 	theHeight=window.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight)
	 theHeight=document.documentElement.clientHeight;
else if (document.body)
	 theHeight=document.body.clientHeight;
 

var top=((theHeight/2)-(objControl.clientHeight/2))+'px';
var left=((theWidth/2)-(objControl.clientWidth/2))+'px';




          objControl.style.position="fixed";
          objControl.style.top= top;
          objControl.style.left= left;
          }
 

 
 }
 
 
 
 function cancelpopup(objid)
 {
 var objControl=document.getElementById(objid);
 
 if(objControl !=null)
{
objControl.style.display="none";
}
 
 }
 
 
 
 
 
 
 
 
 

//function fnAlignControlToCenterScreen(elementId)
//    {
//  
//     var objControl=document.getElementById(elementId);
//    
//     if(objControl !=null)
//     {

//          var left=(objControl.offsetParent.clientWidth/2)-(objControl.clientWidth/2)+objControl.offsetParent.scrollLeft;
//         
//    
//          var top=(objControl.offsetParent.clientHeight/2)-(objControl.clientHeight/2)+objControl.offsetParent.scrollTop;
//           objControl.style.top= top;
//          objControl.style.left= left;
//          }
//    }
//    
//window.onload= fnAdjustDiv;

//window.onresize= fnAdjustDiv;
//window.onscroll= fnAdjustDiv;

//function fnAdjustDiv(trgtDiv)

//{

//fnAlignControlToCenterScreen(trgtDiv);

//}




//function centerVertically(objectID) 
//    {

//        var thisObj = document.getElementById(objectID);
//        var height = (window.innerHeight) ? window.innerHeight: document.documentElement.clientHeight;
//        var objectHeight = parseInt(thisObj.style.height);
//        var newLocation = (height - objectHeight) / 2;
//        
//        thisObj.style.top = newLocation+'px';
//   
//      
//    }
//    function centerHorizontally(objectID) 
//    {
//        var thisObj = document.getElementById(objectID);
//        var width = (window.innerWidth) ? window.innerWidth :   document.body.clientWidth;
//        var objectWidth = parseInt(thisObj.style.width);
//        var newLocation = (width - objectWidth) / 2;
//        thisObj.style.left = newLocation +'px';
//    }
//    function MakeCenter(trgtDiv)
//    {     
//        document.implementation
//        centerHorizontally(trgtDiv);
//        centerVertically(trgtDiv);
//    }
function openURL(URL) {
 popupWin = window.open(URL,'open_window','menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');
}
function openBrochure() {
 popupWin = window.open('http://www.wiziwox.com/Files/Brochure/wiziwox.pdf','open_window','menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');
}
function checkCookie()
{
if (! get_cookie ( "guest" ))
{
popupWin = window.open('http://www.wiziwox.com/downloadRequest.aspx','open_window','menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');
//popupCheck('popupwrapper');
//centeralign('popup');
}
else
{
openBrochure();
}

}


function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

function set_cookie ( name, value, exp_date, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( exp_date )
  {
    var today = new Date();
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }
  else
  {
    var today = new Date();
    var expires = new Date(today.getTime() +  24 * 60 * 60 * 1000);
    cookie_string += "; expires=" + expires.toGMTString();
  }

  if ( path )
        cookie_string += "; path=" + escape ( path );

  if ( domain )
        cookie_string += "; domain=" + escape ( domain );
  
  if ( secure )
        cookie_string += "; secure";
  
  document.cookie = cookie_string;
}

function delete_cookie ( cookie_name )
{
  var cookie_date = new Date ( );  // current date & time
  cookie_date.setTime ( cookie_date.getTime() - 1 );
  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

function clearMe(objId)
{
document.getElementById(objId).innerHtml="";
}
function openPayNow()
{
popupWin = window.open('http://www.wiziwox.com/paynow.aspx','open_window','menubar, toolbar, location, directories, status, scrollbars, resizable, dependent,left=0, top=0');
}

function resetRQ()
{
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestName').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestAddress').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestPhone').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestEmail').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtYourSite').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestComment').value="";
}
function resetComment()
{
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestName').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestAddress').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestPhone').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestEmail').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtRequestComment').value="";
}
function resetSupport()
{
document.getElementById('ctl00_ContentPlaceHolder2_txtUsername').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtPassword').value="";

}

function resetSupportTicket()
{
document.getElementById('ctl00_ContentPlaceHolder2_txtSupportName').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtBusinessName').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtWebURL').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtSupportPhone').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtTicket').value="";
}
function resetSupportFileSend()
{
document.getElementById('ctl00_ContentPlaceHolder2_txtNameSF').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtBusinessNameSF').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtWebURLSF').value="";
document.getElementById('ctl00_ContentPlaceHolder2_txtSupportSFPhone').value="";

}

function resetDReq()
{
document.getElementById('txtNamePopup').value="";
document.getElementById('txtEmailPopup').value="";
document.getElementById('txtCompanyPopup').value="";
document.getElementById('txtPhonePopup').value="";
}

function showHideAdmin(show,hide)
{
document.getElementById(show).style.display="block";
document.getElementById(hide).style.display="none";

}