// JavaScript Document
// STATIONERY BIZ CARD AND LETTERHEAD
$(document).ready(function() {
	$('#nav-example a').each(function() {
		var $link = $(this);
		var $dialog = $('<div></div>')
			.load($link.attr('href'))
			.dialog({
				autoOpen: false,
				title: $link.attr('title'),
				width: 560,
				height: 500
			});

		$link.click(function() {
			$dialog.dialog('open');

			return false;
		});
	});
});

// STATIONERY ENV
$(document).ready(function() {
	$('#nav-example2 a').each(function() {
		var $link = $(this);
		var $dialog = $('<div></div>')
			.load($link.attr('href'))
			.dialog({
				autoOpen: false,
				title: $link.attr('title'),
				width: 560,
				height: 500
			});

		$link.click(function() {
			$dialog.dialog('open');

			return false;
		});
	});
});

// LETTERHEAD POPUPS
function openLetterheadFormat() {
Dialog.alert({url: "/catalog/popups/letterhead_format.html", options: {method: 'get'}}, {className: "alphacube", width: 515, height:500, okLabel: "Close"});
}
function openLetterheadInkColors() {
Dialog.alert({url: "/catalog/popups/letterhead_ink_colors.html", options: {method: 'get'}}, {className: "alphacube", width: 565, height:500, okLabel: "Close"});
}
function openLetterheadTypestyles() {
Dialog.alert({url: "/catalog/popups/letterhead_typestyles.html", options: {method: 'get'}}, {className: "alphacube", width: 515, height:500, okLabel: "Close"});
}
function openLetterheadPaper() {
Dialog.alert({url: "/catalog/popups/letterhead_paper.html", options: {method: 'get'}}, {className: "alphacube", width: 525, height:520, okLabel: "Close"});
}


function openOnSiteInstall2() {
Dialog.alert({url: "/catalog/popups/on_site_installation.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function openOnSiteServiceOptionsHPMailer2() {
Dialog.alert({url: "/catalog/popups/on_site_service_options_hp_mailer2.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function open3YearMaintenanceAgreementOnsite() {
Dialog.alert({url: "/catalog/popups/3_year_maintenance_agreement_onsite.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function open2YearMaintenanceAgreementOnsite() {
Dialog.alert({url: "/catalog/popups/2_year_maintenance_agreement_onsite.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function open1YearMaintenanceAgreementOnsite() {
Dialog.alert({url: "/catalog/popups/1_year_maintenance_agreement_onsite.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function openMaintenanceAgreementDepot() {
Dialog.alert({url: "/catalog/popups/1_year_maintenance_agreement_depot.html", options: {method: 'get'}}, {className: "alphacube", width: 700, height:500, okLabel: "Close"});
}
function openPhoneInstallation2() {
Dialog.alert({url: "/catalog/popups/phone_installation_hp_mailer.html", options: {method: 'get'}}, {className: "alphacube", width: 550, height:500, okLabel: "Close"});
}
function openPhoneInstallation() {
Dialog.alert({url: "/catalog/popups/on_site_service_options_hp_mailer.html", options: {method: 'get'}}, {className: "alphacube", width: 550, height:500, okLabel: "Close"});
}
function openBizCardLogoColor() {
Dialog.alert({url: "/catalog/popups/biz_card_logo_color.html", options: {method: 'get'}}, {className: "alphacube", width: 550, height:550, okLabel: "Close"});
}

function openBizCardPaperSwatches() {
Dialog.alert({url: "/catalog/popups/biz_card_paper_swatches.html", options: {method: 'get'}}, {className: "alphacube", width: 550, height:500, okLabel: "Close"});
}



function openMicrGuarantee() {
Dialog.alert({url: "/catalog/popups/micr_guarantee2.html", options: {method: 'get'}}, {className: "alphacube", width: 540, height:500, okLabel: "Done"});
}

function popArticleSecure() {
	Dialog.alert({url: "/catalog/article_secure-popup.html", options: {method: 'get'}}, {className: "alphacube", width: 540, height:500, okLabel: "Done"});
}

function popArticlePadlock() {
	Dialog.alert({url: "/catalog/article_padlock-popup.html", options: {method: 'get'}}, {className: "alphacube", width: 540, height:500, okLabel: "CLOSE"});
}
function popPadlock() {
	Dialog.alert({url: "/catalog/article_padlock-popup.html", options: {method: 'get'}}, {className: "alphacube", width: 540, height:500, okLabel: "CLOSE"});
}
function popTheromo() {
	Dialog.alert({url: "/catalog/popups/thermo-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}
	
function popCustomLogo() {
	Dialog.alert({url: "/catalog/custom_logo.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popTypestyles() {
	Dialog.alert({url: "/catalog/typestyles.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popColorBgHighSec() {
	Dialog.alert({url: "/catalog/color_bg-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popVoidPantoHighSec() {
	Dialog.alert({url: "/catalog/void_panto-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popErasureProtHighSec() {
	Dialog.alert({url: "/catalog/erasure_prot-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popChemSensitiveHighSec() {
	Dialog.alert({url: "/catalog/chem_sensitive-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popMicroprintHighSec() {
	Dialog.alert({url: "/catalog/microprint-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popRegulationCcHighSec() {
	Dialog.alert({url: "/catalog/regulation_cc-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popSecurityScreenHighSec() {
	Dialog.alert({url: "/catalog/security_screen-high_sec.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popCiPhantom() {
	Dialog.alert({url: "/catalog/ci-phantom.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popCiReversePhantom() {
	Dialog.alert({url: "/catalog/ci-reverse_phantom.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popCiStepRepeat() {
	Dialog.alert({url: "/catalog/ci-step_repeat.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popCiCombo() {
	Dialog.alert({url: "/catalog/ci-combo.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popBgColumns() {
	Dialog.alert({url: "/catalog/bg_columns.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popBgPatterns() {
	Dialog.alert({url: "/catalog/bg-linen.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popBgColorCorpImage() {
	Dialog.alert({url: "/catalog/color_bg-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}
//JUST IN CASE SWITCHED COLOR AND BG IN NAME
function popColorBgCorpImage() {
	Dialog.alert({url: "/catalog/color_bg-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}
function popVoidPantoCorpImage() {
	Dialog.alert({url: "/catalog/void_panto-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popErasureProtCorpImage() {
	Dialog.alert({url: "/catalog/erasure_prot-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popChemSensCorpImage() {
	Dialog.alert({url: "/catalog/chem_sens-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popMicroPrintCorpImage() {
	Dialog.alert({url: "/catalog/microprint-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popRegCcCorpImage() {
	Dialog.alert({url: "/catalog/regulation_cc-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popSecurityScreenCorpImage() {
	Dialog.alert({url: "/catalog/security_screen-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popThermoCorpImage() {
	Dialog.alert({url: "/catalog/thermo-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popWarningBandsCorpImage() {
	Dialog.alert({url: "/catalog/warning_bands-corp_image.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popControlNumberingHs() {
	Dialog.alert({url: "/catalog/control_numbering-hs.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popArtificialWatermarkCont() {
	Dialog.alert({url: "/catalog/artificial_watermark-cont.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function popCustomPmsInk() {
	Dialog.alert({url: "/catalog/custom_pms_ink.html", options: {method: 'get'}}, {className: "alphacube", width: 530, height: 450, okLabel: "CLOSE"});
}

function poprealestateinsideprinting() {
	Dialog.alert({url: "/catalog/real_estate_folder_inside_printing.html", options: {method: 'get'}}, {className: "alphacube", width: 900, height: 500, okLabel: "CLOSE"});
}

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=530,height=400');");

}

function popUpTaxForms(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=600');");

}

function popUpScroll(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=530,height=470');");

}



function popUpSoftVer(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=530,height=550');");

}



function popUpSoftwareImage(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=760,height=420');");

}



function popUpSoftware(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=750,height=500');");

}



function popUpImage(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600');");

}



function popUpLogos(URL, callbackID) {

day = new Date();

id = day.getTime();

if (callbackID != null)

	eval("page" + id + " = window.open('/catalog/' + URL + '?callback=' + callbackID, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=650');");

else

	eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=650');");

}



function popUpVideo(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=550,height=400');");

}



function popUpBackside(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=600');");

}

function popUpPSmailer(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=635,height=600');");

}

function popUpTaxGuides(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open('/catalog/' + URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=850,height=600');");

}
/* Main Window Link

Sample Code = <A HREF="contact_us.php?#RequestQuote" onClick="return targetopener(this)" class="description1Link">Request Form-Quote</A>

*/



function targetopener(mylink, closeme, closeonly){

	if (! (window.focus && window.opener))

		return true;

	window.opener.focus();

	if (! closeonly)

		window.opener.location.href = mylink.href;

	if (closeme)

		window.close();

	return false;

}

//ADDED FOR IMAGE ROLLOVER
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
