// JScript File
function printProductDetails(print_area, prodData)
{
    var data = prodData.split("|");
    var name = data[0];
    var image = data[1];
    var shortDescription = data[2];
    var longDescription = data[3];
    var sku = data[4];
    var price = data[5];

//Creating new page
var pp = window.open("","mywindow","menubar=0,resizable=1,width=700,height=500"); 

//Adding HTML opening tag with <HEAD> … </HEAD> portion 
pp.document.writeln('<HTML><HEAD><title>Print Preview</title>')

pp.document.writeln('<LINK href=App_Themes/Default/Default.css type="text/css" rel="stylesheet">')
//pp.document.writeln('<LINK href=PrintStyle.css type="text/css" rel="stylesheet" media="print">')

//Add style for print page!
pp.document.writeln('<style type="text/css">')

//pp.document.writeln('.AlternateRow {background-color: #EEEEEE;color: white;}')
pp.document.writeln(' body {font-family: Verdana, Arial, Tahoma, Microsoft Sans Serif; font-size: 11px; font-weight: normal; background-color: #fffff; margin: 0px 0px 5px;}')
pp.document.writeln('.TableHead {font-size: 11px;background-color: gray;color: white;font-weight: bold; padding-right: 4px;padding-left: 4px;padding-bottom: 4px;padding-top: 4px;}')
pp.document.writeln('.TableAlter {font-size: 11px; background-color : #eeeeee;}')
pp.document.writeln('TD {font-size: 11px;}')
pp.document.writeln('.TableRow {font-size: 11px;}')
pp.document.writeln(' h4 {font-size: 12px;}')
pp.document.writeln('.titleLayout {font-size: 11px font-weight: bold;color: #ff9900;text-decoration: none;padding-left: 5px;}')
pp.document.writeln('.TableHeadBorder {font-size: 11px; background-color: gray;color: white;font-weight: bold;padding-right: 4px;padding-left: 4px;padding-bottom: 4px;padding-top: 4px;}')

pp.document.writeln('</style>')

//End Add style for print page!
pp.document.writeln('<base target="_self"></HEAD>')
//Adding Body Tag
pp.document.writeln('<body class="body" MS_POSITIONING="GridLayout" bottomMargin="0"');
pp.document.writeln(' leftMargin="0" topMargin="0" rightMargin="0">');
//Adding form Tag
pp.document.writeln('<form method="post">');
//Creating two buttons Print and Close within a HTML table
//Writing print area of the calling page

pp.document.writeln('<TABLE id="myElement" style="height: 500px; width: 700px;" border="0">');
    pp.document.writeln('<tr valign="top">');
        pp.document.writeln('<td align=center style="width: 100%" colspan="4">');
            pp.document.writeln('<a onclick="window.location.reload();window.print();" class="TB_Link" style="cursor:pointer;"> <img id = "Print" src="Images/Design/print-this-page.gif" style="border-width:0px; cursor:pointer;"/>&nbsp;Print</a>');
        pp.document.writeln('</td>');
    pp.document.writeln('</tr>');
    pp.document.writeln('<tr valign="top">');
        pp.document.writeln('<td colspan="4" align="left">');
            pp.document.writeln('<span id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxNameLabel" class="ProductDetailsName">' + name + '</span>');
            pp.document.writeln('<br />');
            pp.document.writeln('<br />');
        pp.document.writeln('</td>');
    pp.document.writeln('</tr>');
    pp.document.writeln('<tr valign="top">');
        pp.document.writeln('<td colspan="2" style="text-align: center;" valign="top" align="left">');
            pp.document.writeln('<img id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxCatalogImage_uxImage"');
            pp.document.writeln('class="NoBorder" src="ImageResize.aspx?img='+image+'&amp;size=350"');
        pp.document.writeln('</td>');
        pp.document.writeln('<td width="25">');
        pp.document.writeln('&nbsp;</td>');
        pp.document.writeln('<td valign="top" width="400">');
            pp.document.writeln('<p align="left">');
            pp.document.writeln('<span id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxShortDescriptionLabel"');
            pp.document.writeln('class="ProductDetailsShortDescription">'+shortDescription+'</span>&nbsp;</p>');
            pp.document.writeln('<p align="left">');
            pp.document.writeln('<span id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxLongDescriptionLabel"');
            pp.document.writeln('class="ProductDetailsLongDescription">'+longDescription+'</span>&nbsp;</p>');
            pp.document.writeln('<p align="left">');
            pp.document.writeln('Product ID# <span id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxProductID">'+sku+'</span>');
            pp.document.writeln('</p>');
            if (price != '$0.00')
            {
                pp.document.writeln('<p style="color: Red;" align="left">');
                pp.document.writeln('Price: <span id="ctl00_uxPlaceHolder_uxProductFormView_uxProductDetails_uxPriceLabel"');
                pp.document.writeln('style="font-weight: bold;">'+price+'</span>');
                pp.document.writeln('</p>');
            }  
            pp.document.writeln('<p align="left">');
            pp.document.writeln('</p>');
        pp.document.writeln('</td>');
    pp.document.writeln('</tr>');
                                                                            
pp.document.writeln('</table>');

}

function getPrint(print_area, vevoData)
{ 

var data = vevoData.split("|");
var sitename = data[0];
var companyName = data[1];
var address = data[2];
var city = data[3];
var state = data[4];
var zipCode = data[5];
var country = data[6];
var phone = data[7];
var fax = data[8];
var email = data[9];



//Creating new page
var pp = window.open();

//Adding HTML opening tag with <HEAD> … </HEAD> portion 
pp.document.writeln('<HTML><HEAD><title>Print Preview</title>')

pp.document.writeln('<LINK href=App_Themes/Default/Default.css type="text/css" rel="stylesheet">')
//pp.document.writeln('<LINK href=PrintStyle.css type="text/css" rel="stylesheet" media="print">')

//Add style for print page!
pp.document.writeln('<style type="text/css">')

//pp.document.writeln('.AlternateRow {background-color: #EEEEEE;color: white;}')
pp.document.writeln(' body {font-family: Verdana, Arial, Tahoma, Microsoft Sans Serif; font-size: 11px; font-weight: normal; background-color: #fffff; margin: 0px 0px 5px;}')
pp.document.writeln('.TableHead {font-size: 11px;background-color: gray;color: white;font-weight: bold; padding-right: 4px;padding-left: 4px;padding-bottom: 4px;padding-top: 4px;}')
pp.document.writeln('.TableAlter {font-size: 11px; background-color : #eeeeee;}')
pp.document.writeln('TD {font-size: 11px;}')
pp.document.writeln('.TableRow {font-size: 11px;}')
pp.document.writeln(' h4 {font-size: 12px;}')
pp.document.writeln('.titleLayout {font-size: 11px font-weight: bold;color: #ff9900;text-decoration: none;padding-left: 5px;}')
pp.document.writeln('.TableHeadBorder {font-size: 11px; background-color: gray;color: white;font-weight: bold;padding-right: 4px;padding-left: 4px;padding-bottom: 4px;padding-top: 4px;}')

pp.document.writeln('</style>')

//End Add style for print page!
pp.document.writeln('<base target="_self"></HEAD>')
//Adding Body Tag
pp.document.writeln('<body class="body" MS_POSITIONING="GridLayout" bottomMargin="0"');
pp.document.writeln(' leftMargin="0" topMargin="0" rightMargin="0">');
//Adding form Tag
pp.document.writeln('<form method="post">');
//Creating two buttons Print and Close within a HTML table
//Writing print area of the calling page

pp.document.writeln('<TABLE width=100%><TR align=center>');
pp.document.writeln('<TD align=center style="width:5%"></TD>');
pp.document.writeln('<TD align=center>');
pp.document.writeln('<table border="0" cellpadding="0" cellspacing="0" style="width: 90%">');


pp.document.writeln('<tr>');
pp.document.writeln('<td align=center style="width: 100%">');

pp.document.writeln('<a onclick="window.location.reload();window.print();" class="TB_Link" style="cursor:pointer;"> <img id = "Print" src="Images/Design/print-this-page.gif" style="border-width:0px; cursor:pointer;"/>&nbsp;Print</a>');

pp.document.writeln('</td>');
pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%"><h4>');
pp.document.writeln(companyName);
pp.document.writeln('</h4></td>');
pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%">');
pp.document.writeln(address);
pp.document.writeln('</td>');
pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%">');
pp.document.writeln(city + ', ');
pp.document.writeln(state + ' ' );
pp.document.writeln(zipCode + ' ' );
pp.document.writeln(country);
pp.document.writeln('</td>');
pp.document.writeln('</tr>');

//pp.document.writeln('<tr>');
//pp.document.writeln('<td style="width: 100%">');
//pp.document.writeln(zipCode);
//pp.document.writeln('</td>');
//pp.document.writeln('</tr>');

//pp.document.writeln('<tr>');
//pp.document.writeln('<td style="width: 100%">');
//pp.document.writeln(country);
//pp.document.writeln('</td>');
//pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%">Phone: ');
pp.document.writeln(phone);
pp.document.writeln('</td>');
pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%">Fax: ');
pp.document.writeln(fax);
pp.document.writeln('</td>');
pp.document.writeln('</tr>');

pp.document.writeln('<tr>');
pp.document.writeln('<td style="width: 100%">Email: ');
pp.document.writeln(email);
pp.document.writeln('</td>');
pp.document.writeln('</tr>');

//pp.document.writeln('<tr>');
//pp.document.writeln('<td align=center style="width: 100%"><h4>');
//pp.document.writeln(sitename);
//pp.document.writeln('</h4></td>');
//pp.document.writeln('</tr>');

pp.document.writeln('<table>');

pp.document.writeln(document.getElementById(print_area).innerHTML);
pp.document.writeln('</TD>');
pp.document.writeln('<TD style="width:5%"></TD>');
pp.document.writeln('</TR></TABLE>');
//Ending Tag of </form>, </body> and </HTML>

pp.document.writeln('<TABLE width=100%><TR><TD align=center>');
//pp.document.writeln('<INPUT ID="AAA" type="button" value="Printer Friendly Version" style="width: 150px" ');
//pp.document.writeln('onclick="javascript:location.reload(true);window.print();">');
//pp.document.writeln('<INPUT ID="CLOSE" type="button" value="Close" style="width: 60px" onclick="window.close();">');

pp.document.writeln('<a onclick="window.location.reload();window.print();" class="TB_Link" style="cursor:pointer;"> <img id = "Printer" src="Images/Design/print-this-page.gif" style="border-width:0px; cursor:pointer;"/>&nbsp;Print</a>');



pp.document.writeln('</TD></TR></TABLE>');

pp.document.writeln('</form></body></HTML>'); 

pp.document.close();

} 

