﻿// JScript File


vPositionX = 100;
vPositionY = 15;

vdefaultWidth  = 100;
vdefaultHeight = 100;


var vAutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var visNN=(navigator.appName=="Netscape")?1:0;
var visIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var voptNN='scrollbars=no,width='+vdefaultWidth+',height='+vdefaultHeight+',left='+vPositionX+',top='+vPositionY;
var voptIE='scrollbars=no,width=300,height=250,left='+vPositionX+',top='+vPositionY;


function PopUpProductOnTheFly(url,imageTitle)
{
    if (imageTitle=='') imageTitle = 'Largest Image';
    if (visNN){imgWin=window.open('about:blank','',voptNN);}
    if (visIE){imgWin=window.open('about:blank','',voptIE);}
    with (imgWin.document)
    {
        writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
        writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
        writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
        writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
        writeln('width=(document.images[0].width-document.body.clientWidth)+100;');
        writeln('height=(document.images[0].height-document.body.clientHeight)+100;');
        writeln('window.resizeBy(width,height);}');writeln('if (isNN){');       
        writeln('window.innerWidth=document.images["George"].width+100;');writeln('window.innerHeight=document.images["George"].height+100;}}');
        writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
        if (!AutoClose) writeln('</head><body style="text-align:center " bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
        else writeln('</head><body style="text-align:center;margin-top:10px;" bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close();" >');
        writeln('<img name="George"  src="' + url + '" style="display:block;" onclick="javascript:self.close();">');
        writeln('</br>');
        writeln('</br>');
        writeln('<div onclick="javascript:self.close();"><a href="#">Close</a></div>');
        writeln('</body></html>');
        close();		
  }
}


//=======================
function NewWindow(url,vHeight,vWidth)
{
   winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(vHeight).concat(',').concat('width=').concat(vWidth).concat(',');
   winDef = winDef.concat('top=').concat((screen.height - vHeight)/2).concat(',');
   winDef = winDef.concat('left=').concat((screen.width - vWidth)/2);
   newWin = window.open(url, '_blank', winDef);
   newWin.focus();               
}       

    function PrintSubject()
    {  
	   	w=open();
	    w.document.writeln('<html>');
	    w.document.writeln('<head>');
	    w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
	    w.document.writeln('<LINK rel="stylesheet" type="text/css" href="App_Themes/default/Default.css" />');
	    w.document.writeln('</head>');
	    w.document.writeln('<body topmargin=3 leftmargin=0 marginheight=3 marginwidth=0>');
	    w.document.writeln('<table cellspacing=0 cellpadding=0 border=0 width=600 align=center>');
	    w.document.writeln('<tr>');
	    w.document.writeln('<td colspan="2" >');
	    w.document.writeln(document.getElementById('Banner').outerHTML);
	    w.document.writeln('</td>');
	    w.document.writeln('</tr>');
	    w.document.writeln('<tr>');
	    w.document.writeln('<td valign="top" >');	    
	    w.document.writeln(document.getElementById('Content').outerHTML);	    	    	   
	    w.document.writeln('</td>');
	    w.document.writeln('<td valign="top" class="VNVN_17_UC_PRODUCT_DETAIL_Text">');	    
	    w.document.writeln(document.getElementById('Code').outerHTML);	    	       
	    w.document.writeln('<a onclick="javascript:location.reload(true);window.print();" style=" cursor:hand" class="VNVN_17_UC_FOOTER_Print">');
	    w.document.writeln('<img src="Images/icon_printthispage.jpg" />');	
	    w.document.writeln('  Print this page');
	    w.document.writeln('</a>');
	    w.document.writeln('</td>');
	    w.document.writeln('</tr>');
	    w.document.writeln('<tr>');
	    w.document.writeln('<td colspan="2">');	    
	    w.document.writeln(document.getElementById('Content1').outerHTML);	    	    
	    w.document.writeln(document.getElementById('FooterTB').outerHTML);	    	    
	    w.document.writeln('</td>');
	    w.document.writeln('</tr>');	    
	    w.document.writeln('</table>');
	    w.document.writeln('</body>');
	    w.document.writeln('</html>');
	    w.document.title = document.title;	   
	    return false; 
    }
 
PositionX = 100;
PositionY = 15;
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 100;
defaultHeight = 100;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=300,height=250,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle,imagePrice)
{
    if (imageTitle=='') imageTitle = 'Popup Image';
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document)
    {
        writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
        writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
        writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
        writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
        writeln('width=(document.images[0].width-document.body.clientWidth)+100;');
        writeln('height=(document.images[0].height-document.body.clientHeight)+100;');
        writeln('window.resizeBy(width,height);}');writeln('if (isNN){');       
        writeln('window.innerWidth=document.images["George"].width+100;');writeln('window.innerHeight=document.images["George"].height+100;}}');
        writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
        if (!AutoClose) writeln('</head><body style="text-align:center" bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
        else writeln('</head><body style="text-align:center" bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close();" >');
        writeln('<img name="George" src='+imageURL+' style="display:block;" onclick="javascript:self.close();">');
        writeln('</br>');
        writeln(imageTitle);
        writeln('</br>');
        writeln('Price: <font color="RED">$'+imagePrice+'</font>');
        writeln('</br>');
        writeln('<div onclick="javascript:self.close();"><a href="#">Close</a></div>');
        writeln('</body></html>');
        close();		
  }
}


function popProduct(imageDesignURL,imageFrameUrl,imageTitle)
{
    if (imageTitle=='') imageTitle = 'Popup Image';
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document)
    {
        writeln('<html><head><title>Loading...</title><link href="../App_Themes/default/Default.css" rel="stylesheet" type="text/css" /><link href="App_Themes/default/Default.css" rel="stylesheet" type="text/css" /><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
        writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
        writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
        writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
        writeln('width=(document.images[0].width-document.body.clientWidth)+100;');
        writeln('height=(document.images[0].height-document.body.clientHeight)+100;');
        writeln('window.resizeBy(width,height);}');writeln('if (isNN){');       
        writeln('window.innerWidth=document.images["George"].width+100;');writeln('window.innerHeight=document.images["George"].height+100;}}');
        writeln('function doTitle(){document.title="'+imageTitle+'";}');
        writeln('function innitFrame(){if(document.forms[0]["George"].width>document.images["George"].height){document.forms[0]["Frame"].width=document.forms[0]["George"].width+10;document.forms[0]["Frame"].height=document.images["George"].height+5;}else{document.forms[0]["Frame"].width=document.forms[0]["George"].width+10;document.forms[0]["Frame"].height=document.images["George"].height+8;}}');
        writeln('</sc'+'ript>');
        if (!AutoClose) writeln('</head><body bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus();innitFrame();">')
        else writeln('</head><body bgcolor=#fff0e7 scroll="no" onload="reSizeToImage();doTitle();self.focus();innitFrame();" >');
        writeln('<form id="form1" runat="server">');
        writeln('<table cellspacing="20px;" width="100%" border="0"><tr style="width:100%"><td style="width:10px;"></td><td style="width:100%">');
         writeln('<div id="examplematScript" >');
        writeln('<img id="George" name="George" src='+imageDesignURL+' alt="" />');
        writeln('</div>');
        writeln('<div id="exampleframe">');
        writeln('<img id="Frame" name="Frame" src='+imageFrameUrl+' alt="" width="javascript:document.images[0].width" height="javascript:document.images[0].height" />');
        writeln('</div>');
       
        
        writeln('</br>');
        writeln('<div onclick="javascript:self.close();" style="text-align:center"><a href="#">Close</a></div>');
        writeln('</td><td style="width:10px;"></td></tr></table>');
        writeln('</form>');
        writeln('</body></html>');
        close();		
  }
}