﻿// JScript File

function closePopUp(popupdivid) {

    var outerDiv = 0;
    
    document.getElementById('popUpOuter').style.display = "none";
    //document.getElementById('popUpBak').style.display = "none";
    //document.getElementById('popUpOuter').style.height = "0%";
    //document.getElementById('popUpOuter').style.width = "0%";
    //document.getElementById('popUpBak').style.height = "0%";
    //document.getElementById('popUpBak').style.width = "0%";
    //document.getElementById('popUpBak').style.opacity = outerDiv/10;
    //document.getElementById('popUpBak').style.filter = 'alpha(opacity=' + outerDiv*10 + ')';

    document.getElementById('popUpDiv').style.position = "absolute";
    document.getElementById('popUpDiv').style.left = "-5000px";
    document.getElementById('popUpDiv').style.top = "0px";
    
    document.getElementById(popupdivid).style.display = "none";
}

function displayPopUp(popupdivid) {
	
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;
  } 

    document.getElementById('popUpDiv').style.position = "absolute";
    document.getElementById('popUpDiv').style.left = (myWidth/2 - 280)+'px';
    document.getElementById('popUpDiv').style.top = (myHeight/2 - 100)+'px';	
    
    document.getElementById(popupdivid).style.display = "block";
}

function displayPopUpWidth(popupdivid, objheight, objwidth) {
	
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;
  } 

    document.getElementById('popUpDiv').style.position = "absolute";
    document.getElementById('popUpDiv').style.left = (myWidth/2 - objwidth/2)+'px';
    document.getElementById('popUpDiv').style.top = (myHeight/2 - objheight/2)+'px';	
    
    document.getElementById(popupdivid).style.display = "block";
}

function displayPopUpCustomer(popupdivid) {
	
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;
  } 

    document.getElementById('popUpDiv').style.position = "absolute";
    document.getElementById('popUpDiv').style.left = (myWidth/2 - 300)+'px';
    document.getElementById('popUpDiv').style.top = (myHeight/2 - 100)+'px';	
    
    document.getElementById(popupdivid).style.display = "block";
}

function displayPopUpCustomerWide(popupdivid) {
	
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;
  } 

    document.getElementById('popUpDiv').style.position = "absolute";
    document.getElementById('popUpDiv').style.left = (myWidth/2 - 330)+'px';
    document.getElementById('popUpDiv').style.top = (myHeight/2 - 100)+'px';	
    
    document.getElementById(popupdivid).style.display = "block";
}

function displayBak() {
	
  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;
  } 


    var outerDiv = 6;
    //document.getElementById('popUpOuter').style.height = myHeight;
    //document.getElementById('popUpOuter').style.width = myWidth;
	document.getElementById('popUpOuter').style.display = "block";
	document.getElementById('popUpBak').style.height = myHeight;
    document.getElementById('popUpBak').style.width = myWidth;
    
	document.getElementById('popUpBak').style.opacity = outerDiv/10;
    document.getElementById('popUpBak').style.filter = 'alpha(opacity=' + outerDiv*10 + ')';
}