var newwindow = '';
function popitupImage(url) {
newwindow=window.open(url,'htmlname','width=655,height=600,resizable=1');
}
function submit_page(buttonName) {
var frm = document.frm_poster;
var passed = '';
passed = frm.passed.value;
if (passed == '0') {
alert('Please select a product to continue.');
} else {
document.getElementById(buttonName).value = 1;
//document.frm_poster.submit();
document.getElementById('frm_poster').submit();
}
}
function submit_review() {
var passed = '';
frm = document.frm_poster;
passed = frm.passed.value;
document.getElementById('submit_project_btn_x').value = 1;
if (passed == 0) {
alert('Please select a product to continue.');
return false;
} else {
document.frm_poster.submit();
}
}
function set_border(borderValue) {
frm = document.frm_poster;
frm.add_border.value = borderValue;
}
function set_grommet() {
frm = document.frm_poster;
grommet = frm.grommets.checked;
frm.add_grommet.value = 1;
//if (grommet) {
// frm.add_grommet.value = 1;
//} else {
// frm.add_grommet.value = 0;
//}
compute_grommet();
}
function compute_grommet() {
grommet_spacing_in_ft = 2;
grommet_price_per_pc = 2;
frm = document.frm_poster;
grommet_flag = frm.add_grommet.value;
grommet_qty = 0;
grommet_price = 0;
width = frm.width.value;
height = frm.height.value;
quantity = frm.quantity.value;
if (grommet_flag == 1) {
if (width > 0 && height > 0 && quantity > 0) {
width_spacing = Math.floor((width / 12) / grommet_spacing_in_ft);
if (width_spacing < 1) {
width_spacing = 1;
}
width_grommets = (width_spacing + 1) * 2;
//width_grommets = (Math.floor((width / 12) / grommet_spacing_in_ft) + 1) * 2;
height_spacing = Math.floor((height / 12) / grommet_spacing_in_ft);
if (height_spacing < 1) {
height_spacing = 1;
}
height_grommets = ((height_spacing + 1) - 2) * 2;
//height_grommets = ((Math.floor((height / 12) / grommet_spacing_in_ft) + 1) - 2) * 2;
grommet_qty = (width_grommets + height_grommets);
if (grommet_qty < 4) {
grommet_qty = 4;
}
grommet_qty = grommet_qty * quantity;
grommet_price = grommet_qty * grommet_price_per_pc;
} else if (width > 0 && height > 0 && quantity == 0) {
width_spacing = Math.floor((width / 12) / grommet_spacing_in_ft);
if (width_spacing < 1) {
width_spacing = 1;
}
width_grommets = (width_spacing + 1) * 2;
//width_grommets = (Math.floor((width / 12) / grommet_spacing_in_ft) + 1) * 2;
height_spacing = Math.floor((height / 12) / grommet_spacing_in_ft);
if (height_spacing < 1) {
height_spacing = 1;
}
height_grommets = ((height_spacing + 1) - 2) * 2;
//height_grommets = ((Math.floor((height / 12) / grommet_spacing_in_ft) + 1) - 2) * 2;
grommet_qty = (width_grommets + height_grommets);
if (grommet_qty < 4) {
grommet_qty = 4;
}
//grommet_qty = grommet_qty * quantity;
grommet_price = grommet_qty * grommet_price_per_pc;
}
}
if(frm.grommets.checked==true) {
document.getElementById('total_grommets').innerHTML = grommet_qty;
frm.grommet_qty.value = grommet_qty;
frm.grommet_price.value = grommet_price;
} else {
document.getElementById('total_grommets').innerHTML = grommet_qty;
frm.grommet_qty.value = 0;
frm.grommet_price.value = 0;
}
//document.getElementById('total_grommets').innerHTML = grommet_qty;
//frm.grommet_qty.value = grommet_qty;
//frm.grommet_price.value = grommet_price;
//if(quantity >= 0) {
// get_price_newdb_posters();
//}
}
function compute_area() {
var area = 0;
var border_size = 4;
var frm = document.frm_poster;
var poster_id = frm.poster_id.value;
var sizeType = frm.size_type.value;
if (sizeType != 'custom') {
if(document.getElementById('customSize'))
document.getElementById('customSize').style.display = 'none';
var sizetemp = frm.size_temp.value.split('x');
var width_temp = sizetemp[0];
var height_temp = sizetemp[1];
var border_value = frm.add_border.value;
} else {
document.getElementById('customSize').style.display = '';
var height_temp = parseFloat(frm.height_temp.value);
var width_temp = parseFloat(frm.width_temp.value);
var border_value = frm.add_border.value;
}
width = width_temp;
height = height_temp;
//if (border_value == 0) { // uncomment this if you need to charge the cost of the borders
//} else if(border_value == 1) { // uncomment this if you need to charge the cost of the borders
// width = width_temp + border_size; // uncomment this if you need to charge the cost of the borders
// height = height_temp + border_size; // uncomment this if you need to charge the cost of the borders
//} // uncomment this if you need to charge the cost of the borders
frm.width.value = width;
frm.height.value = height;
area = height * width / 144;
frm.area.value = area;
inner_string = width+'" x '+height+'"';
// document.getElementById('final_size').innerHTML = inner_string;
}
function get_price_newdb_posters() {
frm = document.frm_poster;
poster_id = frm.poster_id.value;
if(document.getElementById('disp_disc_price')){
document.getElementById('disp_disc_price').innerHTML = ' ';
}
compute_area();
//alert(frm.grommets.checked);
if (poster_id==5) {
if(frm.grommets) {
set_grommet();
}
}
quantity = frm.quantity.value;
area = frm.area.value;
turnaround = frm.turnaround.value;
x_get_price_newdb_posters(poster_id, area, turnaround, quantity, display_price_newdb_posters);
//x_get_price_newdb_posters(poster_id, area, turnaround, quantity, display_price_newdb_posters);
//alert('id:'+poster_id+'qty:'+quantity+'area:'+area+'turn'+turnaround);
//wt_per_sq_ft = frm.wt_per_sq_ft.value;
//total_weight = parseFloat(wt_per_sq_ft)*parseFloat(area)*parseFloat(quantity);
//frm.total_weight.value = total_weight;
//alert(poster_id+'-'+quantity+'-'+area+'-'+turnaround+'-'+wt_per_sq_ft+'-'+total_weight);
//if(poster_id == 0 || area == 0 || turnaround == 0 || quantity == 0) {
// frm.passed.value = 0;
//} else {
// x_get_price_newdb_posters(poster_id, area, turnaround, quantity, display_price_newdb_posters);
//}
}
function display_price_newdb_posters(returned_array) {
//alert(returned_array);
var returned_array = returned_array.replace("+:", "");
eval(returned_array);
var handling_fee = 5.0;
var total_with_handling_fee = 0;
frm = document.frm_poster;
//alert(frm.grommet_price.value);
if (error_msg == '') {
frm.passed.value = 1;
frm.unit_price.value = unit_price;
frm.total_price.value = total_price;
if(document.getElementById('disp_printing_cost')){
// display printing cost
document.getElementById('disp_printing_cost').innerHTML = '$'+total_price;
}
frm.turnaround.value = turnaround;
// document.getElementById('turnDisplay').innerHTML = max_turnaround;
document.getElementById('turnDisplay').innerHTML = ( parseInt(max_turnaround) > 1 ? parseInt(max_turnaround) + ' Business Days' : '1 Business Day' );
frm.wt_per_sq_ft.value = wt_per_sq_ft;
frm.total_weight.value = weight;
if(frm.grommet_price.value) {
grommet_price = frm.grommet_price.value;
var disp_grommet_price = parseFloat(grommet_price);
disp_grommet_price = disp_grommet_price.toFixed(2);
total_price = parseFloat(total_price) + parseFloat(grommet_price);
total_with_handling_fee = parseFloat(total_price) + handling_fee;
//total_with_handling_fee = parseFloat(total_price) + handling_fee + parseFloat(grommet_price);
} else {
total_with_handling_fee = parseFloat(total_price) + handling_fee;
}
//Unit Price
var disp_handling_fee = handling_fee.toFixed(2);
disp_total_with_handling_fee = total_with_handling_fee.toFixed(2);
nf = new NumberFormat(total_price);
nf.setPlaces(2);
nf.setCommas(false);
var total_price_temp = nf.toFormatted();
var total_price = total_price_temp;
// display reg price less disc price
var discountPrice = (discountPrice ? discountPrice : 0);
nf = new NumberFormat(parseFloat(total_price - discountPrice));
nf.setPlaces(2);
var discountedPrice = nf.toFormatted();
nf = null;
if(document.getElementById('disp_disc_price')){
document.getElementById('disp_disc_price').innerHTML = '$' + discountedPrice;
}
//nf = new NumberFormat(disp_total_with_handling_fee-handling_fee);
nf = new NumberFormat(disp_total_with_handling_fee);
nf.setPlaces(2);
nf.setCommas(false);
var disp_total_with_handling_fee = nf.toFormatted();
nf = null;
//alert(disp_total_with_handling_fee);
//Unit Price based from Subtotal
//nf = new NumberFormat(disp_total_with_handling_fee/frm.quantity.value);
nf = new NumberFormat((disp_total_with_handling_fee - handling_fee)/frm.quantity.value);
nf.setPlaces(2);
var disp_unit_price = nf.toFormatted();
if(document.getElementById('disp_grommets')) {
if(disp_grommet_price == '0.00'){
document.getElementById('disp_grommets').style.display = 'none';
} else {
document.getElementById('disp_grommets').style.display = 'block';
}
}
if(document.getElementById('disp_grommet_price'))
document.getElementById('disp_grommet_price').innerHTML = '$'+disp_grommet_price;
if(document.getElementById('disp_handling_fee'))
document.getElementById('disp_handling_fee').innerHTML = '$'+disp_handling_fee;
if(document.getElementById('disp_unit_price'))
document.getElementById('disp_unit_price').innerHTML = '$'+disp_unit_price;
if(document.getElementById('disp_total_with_handling_fee'))
document.getElementById('disp_total_with_handling_fee').innerHTML = '$'+disp_total_with_handling_fee;
if(document.getElementById('disp_discount'))
document.getElementById('disp_discount').innerHTML = '$'+discountPrice;
if(document.getElementById('floating_cost')){
document.getElementById('floating_cost').innerHTML = '
Total Cost $' + disp_total_with_handling_fee + '
';
if(navigator.appName != 'Netscape'){
document.getElementById('floating_cost').style.position = 'absolute';
}
}
} else {
alert(error_msg);
frm.passed.value = 0;
if(document.getElementById('disp_grommets')) {
document.getElementById('disp_grommets').style.display = 'none';
}
if(document.getElementById('disp_grommet_price'))
document.getElementById('disp_grommet_price').innerHTML = '$';
if(document.getElementById('disp_handling_fee'))
document.getElementById('disp_handling_fee').innerHTML = '$';
if(document.getElementById('disp_unit_price'))
document.getElementById('disp_unit_price').innerHTML = '$';
if(document.getElementById('disp_total_with_handling_fee'))
document.getElementById('disp_total_with_handling_fee').innerHTML = '$';
if(document.getElementById('disp_discount'))
document.getElementById('disp_discount').innerHTML = '$';
if(document.getElementById('floating_cost')){
document.getElementById('floating_cost').innerHTML = 'Total Cost $
';
if(navigator.appName != 'Netscape'){
document.getElementById('floating_cost').style.position = 'absolute';
}
}
}
}
var tabNames = new Array();
function showTab(tabName) {
tabNames[0] = 'tabPosterProductDetails';
tabNames[1] = 'tabPosterDigitalPrintGuide';
for(var i=0;i < tabNames.length;i++) {
if(tabNames[i]==tabName) {
document.getElementById(tabName).className='tabPostersVisible';
} else {
document.getElementById(tabNames[i]).className='tabPostersHidden';
}
}
}
function changePosterId(id,name,paper) {
var myForm = document.frm_poster;
myForm.poster_id.value = id;
myForm.poster_name.value = name;
myForm.paper.value = paper;
if(id==14) { // Gallery Wrapped Canvas
if(document.getElementById('divWidthHeight'))
document.getElementById('divWidthHeight').style.display = 'none';
if(document.getElementById('divSize'))
document.getElementById('divSize').style.display = '';
} else {
if(document.getElementById('divWidthHeight'))
document.getElementById('divWidthHeight').style.display = '';
if(document.getElementById('divSize'))
document.getElementById('divSize').style.display = 'none';
}
get_price_newdb_posters();
}
function highLight(valLength,valName,valNode) {
for(i=0;i < valLength;i++) {
if(i==valNode) {
document.getElementById(valName+valNode).className='ups_radio_highlight';
} else {
document.getElementById(valName+i).className='ups_radio';
}
}
}
function hitEnter (field, event) {
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
if (keyCode == 13)
return true;
else
return false;
}
function spinLoader() {
if(document.getElementById('zip_code').value!='' && document.getElementById('zip_code').value!='Enter' && document.getElementById('zip_code').value!='Enter Zip Code') {
document.getElementById('shipping_zipcode').value = document.getElementById('zip_code').value;
document.getElementById('shippingZipLink').innerHTML = document.getElementById('zip_code').value;
document.getElementById('calculateLink').style.display = 'none';
document.getElementById('spinImg').style.display = '';
setTimeout("getLfpUpsxmlRates();",2000);
} else {
document.getElementById('shipping_zipcode').value = '';
alert('Please enter zipcode to calculate shipping.');
}
return false;
}
function showShippingZipcode() {
document.getElementById('calculateLink').style.display = '';
document.getElementById('spinImg').style.display = 'none';
document.getElementById('shippingZipcode').style.display = '';
document.getElementById('shippingResult').style.display = 'none';
}
function setVisibility(value) {
if(value==true) {
if(document.getElementById('shippingTitle'))
document.getElementById('shippingTitle').innerHTML = 'Ship to '+document.getElementById('zip_code').value+' Change';
if(document.getElementById('shippingCalculatorTD'))
document.getElementById('shippingCalculatorTD').className = 'shippingCalculatorTDHidden';
if(document.getElementById('shippingCalculatorRes'))
document.getElementById('shippingCalculatorRes').className = 'shippingCalculatorTDVisibleNoBg';
//if(document.getElementById('printArrival'))
// document.getElementById('printArrival').style.display = '';
computeDateEst(document.getElementById('turnaround_temp').value,1);
} else {
document.getElementById('calculateLink').style.display = '';
document.getElementById('spinImg').style.display = 'none';
document.getElementById('shippingZipcode').style.display = '';
document.getElementById('shippingResult').style.display = 'none';
if(document.getElementById('shippingTitle'))
document.getElementById('shippingTitle').innerHTML = 'Shipping Options';
if(document.getElementById('divSpinLoader'))
document.getElementById('divSpinLoader').innerHTML = '
';
if(document.getElementById('shippingCalculatorTD'))
document.getElementById('shippingCalculatorTD').className = 'optSetCalcYt';
if(document.getElementById('shippingCalculatorRes'))
document.getElementById('shippingCalculatorRes').className = 'shippingCalculatorTDHidden';
//document.getElementById('quoteRatesDisplayExpand').className = 'shippingCalculatorTDHidden';
}
}
function updatePricingDisplay(upsRate) {
var upsRate = upsRate;
var printingRate = document.frm_poster.total_price.value;
var handlingFee = 5;
if(PROMO && PROMO=='y') {
if(PROMO_CODE_PERCENTAGE && PROMO_CODE_PERCENTAGE!='') {
nf = new NumberFormat(PROMO_CODE_PERCENTAGE/100);
nf.setPlaces(2);
var promo_code_percent = nf.toFormatted();
nf = null;
nf = new NumberFormat(printingRate*promo_code_percent);
nf.setPlaces(2);
var discountPrice = nf.toFormatted();
nf = null;
} else if(PROMO_CODE_AMOUNT && PROMO_CODE_AMOUNT!='') {
nf = new NumberFormat(PROMO_CODE_AMOUNT);
nf.setPlaces(2);
var discountPrice = nf.toFormatted();
nf = null;
}
if(PROMO_CODE_MAX && PROMO_CODE_MAX!='') {
if(discountPrice>PROMO_CODE_MAX) {
nf = new NumberFormat(PROMO_CODE_MAX);
nf.setPlaces(2);
var discountPrice = nf.toFormatted();
nf = null;
}
}
var totalRate = parseFloat(upsRate) + parseFloat(printingRate) - discountPrice + handlingFee;
} else {
var totalRate = parseFloat(upsRate) + parseFloat(printingRate) + handlingFee;
}
nf = new NumberFormat(totalRate);
nf.setPlaces(2);
var totalRate = nf.toFormatted();
nf = null;
nf = new NumberFormat(upsRate);
nf.setPlaces(2);
var upsRate = nf.toFormatted();
nf = null;
document.getElementById('disp_total_with_handling_fee').innerHTML = '$'+totalRate;
if(upsRate!=0) {
if(document.getElementById('disp_shipping_price')){
if(document.getElementById('lfp_shipping'))
document.getElementById('lfp_shipping').style.display = '';
document.getElementById('disp_shipping_price').innerHTML = '$'+upsRate;
}
} else {
if(document.getElementById('lfp_shipping'))
document.getElementById('lfp_shipping').style.display = '';
if(document.getElementById('disp_shipping_price'))
document.getElementById('disp_shipping_price').innerHTML = 'FREE';
}
}
function getLfpUpsxmlRates() {
var oForm = document.frm_poster;
var shippingZip = oForm.zip_code.value;
var totalWeight = oForm.total_weight.value;
var posterQty = oForm.quantity.value;
var posterId = oForm.poster_id.value;
var posterWidth = oForm.width.value;
var posterHeight = oForm.height.value;
// var posterTurn = document.getElementById('turnDisplay').innerHTML;
var posterTurn = parseInt(document.getElementById('turnDisplay').innerHTML);
document.getElementById('result_shippingRates').innerHTML = '
';
x_get_ups_xml_lfp(shippingZip, posterWidth, posterHeight, totalWeight, posterQty, posterTurn, posterId, displayLfpUpsxmlRates);
}
function displayLfpUpsxmlRates(returnedValue) {
var returnedValue = returnedValue.replace("+:", "");
var oForm = document.frm_poster;
var qtyValue = oForm.quantity.value;
var shippingZip = oForm.zip_code.value;
if(qtyValue!=0 && shippingZip!='' && shippingZip!='Enter Zip Code') {
document.getElementById('result_shippingRates').innerHTML = returnedValue;
document.getElementById('shippingZipcode').style.display = 'none';
document.getElementById('shippingResult').style.display = '';
if(document.getElementById('default_shipping'))
updatePricingDisplay(parseFloat(document.getElementById('default_shipping').value));
//document.getElementById('disp_shipping_price').innerHTML = document.getElementById('ups_shipping_ground').value;
} else {
if(document.getElementById('lfp_shipping'))
document.getElementById('lfp_shipping').style.display = '';
document.getElementById('disp_shipping_price').innerHTML = 'FREE';
//setVisibility(false);
}
//alert(returnedValue);
}
function highLightDiscount(divId) {
document.getElementById(divId).className='upsDiscountHighLight';
}
function highLightDiscountOff(divId) {
if(document.getElementById(divId)) {
document.getElementById(divId).className='upsDiscount';
}
}
function changeZipcode(valueFlag) {
if (valueFlag=='y') {
if(!document.getElementById('zip_code').value || document.getElementById('zip_code').value=='' || document.getElementById('zip_code').value=='Enter Zip Code') {
document.getElementById('zip_code').maxLength = 14;
document.getElementById('zip_code').value = 'Enter Zip Code';
}
} else {
if(!document.getElementById('zip_code').value || document.getElementById('zip_code').value=='' || document.getElementById('zip_code').value=='Enter Zip Code') {
document.getElementById('zip_code').maxLength = 5;
document.getElementById('zip_code').value = '';
}
}
}
function setWrapping(inputValue) {
var museumWraps = document.frm_poster.museum_wrap;
if(inputValue == 'Gallery Wrap') {
for(var i=0; i < museumWraps.length; i++) {
museumWraps[i].disabled = true;
}
document.getElementById('divMuseumWrap').style.display = 'none';
document.getElementById('side_wrap').value = inputValue;
} else {
for(var i=0; i < museumWraps.length; i++) {
museumWraps[i].disabled = false;
}
document.getElementById('divMuseumWrap').style.display = '';
document.getElementById('side_wrap').value = inputValue;
}
//alert(document.getElementById('side_wrap').value);
}
function setTurn(turnValue) {
var turnValue = turnValue.split(" ");
if(document.getElementById('turnaround_temp'))
document.getElementById('turnaround_temp').value = turnValue[0];
}
function computeDateEst(turnaround,transit_time){
var total_days = parseInt(turnaround) + parseInt(transit_time);
x_compute_date_estimate(total_days, '', displayDateEst);
}
function displayDateEst(returnValue) {
returnValue = returnValue.replace('+:','');
document.getElementById('estDate').innerHTML = returnValue.toUpperCase();
}
function selectThis(elemId) {
var upsShipping = ['upsCustomFreight','upsGround','ups2DayAir','ups1DayAir'];
for (var i=0; i <= upsShipping.length; i++) {
if (upsShipping[i]==elemId) {
if(document.getElementById(elemId)) {
document.getElementById(elemId).className = 'selected';
}
} else {
if(document.getElementById(upsShipping[i])) {
document.getElementById(upsShipping[i]).className = '';
}
}
}
}
/* added by mariz 06/23/2009 */
function convertSize(){
setSizeRange(document.getElementById('width_temp'));
setSizeRange(document.getElementById('height_temp'));
}
function setSizeRange(obj){
var cur_value = obj.value;
var obj2 = (obj.name == 'width_temp' ? document.getElementById('height_temp') : document.getElementById('width_temp'));
var obj2_val = parseFloat(obj2.value);
var sz_unit = getRadio(document.frm_poster, 'unit');
// check if obj2 can use 1st range
if(cur_value >= parseFloat(r2_min) && cur_value <= parseFloat(r2_max)){
var obj2_range = r1; // use 1st range
} else {
var obj2_range = r2; // 2nd range
}
obj2.options.length = 0;
for(var i = 0; i < obj2_range.length; i++){
var opt_value = obj2_range[i];
var opt_text = '';
opt_text = (sz_unit == 'in' ? opt_value + '"' : formatIntoFt(opt_value));
if(opt_text && (sz_unit == 'in' || (sz_unit == 'ft' && opt_value >= 12 ))){
var def_selected = (obj2.options.length == 0);
var selected = (obj2_val == opt_value);
obj2.options[obj2.options.length] = new Option(opt_text, opt_value, def_selected, selected);
}
}
}
function formatIntoFt(inch_value){
size_in_ft = '';
if(inch_value >= 12){
var size_ft = parseInt(inch_value/12);
var size_in = (inch_value - (size_ft * 12));
size_in_ft = (size_ft ? size_ft + "'" : '');
size_in_ft += (size_in ? ' ' + size_in + '"' : '');
}
return size_in_ft;
}
function showSizes(size_type, page){
var arr_size_type = ['standard', 'custom'];
var display = '';
var cName = '';
document.getElementById('size_type').value = size_type;
if(CURRENT_PAGE == 'catalog_posters_jun'){
for(var i = 0; i < arr_size_type.length; i++) {
if(arr_size_type[i] == size_type){
display = 'block';
cName = 'switch switchSel';
} else {
display = 'none';
cName = 'switch';
}
if(document.getElementById(arr_size_type[i] + 'Size')) {
document.getElementById(arr_size_type[i] + 'Size').style.display = display;
document.getElementById(arr_size_type[i] + 'Link').className = cName;
}
}
} else {
for(var i = 0; i < arr_size_type.length; i++) {
// for digital order confirm specs
if(arr_size_type[i] == size_type){
display = 'block';
} else {
display = 'none';
}
if(document.getElementById(arr_size_type[i] + 'Size')) {
document.getElementById(arr_size_type[i] + 'Size').style.display = display;
}
}
if(size_type=='standard') {
document.getElementById('standardLink').className = 'standardLinkSel';
document.getElementById('customLink').className = 'customLinkUnsel';
} else if(size_type=='custom') {
document.getElementById('standardLink').className = 'standardLinkUnsel';
document.getElementById('customLink').className = 'customLinkSel';
}
}
}
function showProdTab(tabName){
var tabArray = ['Features', 'Ideas','Papers','Specs'];
if(tabName!=''){
document.getElementById('visSet').className = 'invSet';
}
for(var i=0; i < tabArray.length; i++) {
if(tabArray[i]==tabName) {
if(document.getElementById('li'+tabName))
document.getElementById('li'+tabName).className = 'sel';
} else {
if(document.getElementById('li'+tabArray[i]))
document.getElementById('li'+tabArray[i]).className = '';
}
}
if(tabName == 'Features'){
if(document.getElementById('divIdeasF'))
document.getElementById('divIdeasF').style.display = '';
if(document.getElementById('divIdeas'))
document.getElementById('divIdeas').style.display = 'none';
if(document.getElementById('divDesigns'))
document.getElementById('divDesigns').style.display = 'none';
if(document.getElementById('divContents'))
document.getElementById('divContents').style.display = 'none';
if(document.getElementById('divContents') && tabName!='')
document.getElementById('divContents').innerHTML = '
';
}else if(tabName == 'Ideas'){
if(document.getElementById('divIdeasF'))
document.getElementById('divIdeasF').style.display = 'none';
if(document.getElementById('divIdeas'))
document.getElementById('divIdeas').style.display = '';
if(document.getElementById('divDesigns'))
document.getElementById('divDesigns').style.display = 'none';
if(document.getElementById('divContents'))
document.getElementById('divContents').style.display = 'none';
if(document.getElementById('divContents') && tabName!='')
document.getElementById('divContents').innerHTML = '
';
} else {
if(document.getElementById('divIdeasF'))
document.getElementById('divIdeasF').style.display = 'none';
if(document.getElementById('divIdeas'))
document.getElementById('divIdeas').style.display = 'none';
if(document.getElementById('divContents') && tabName!=''){
document.getElementById('divContents').style.display = '';
}else{
document.getElementById('divContents').style.display = 'none';
}
if(document.getElementById('divContents') && tabName!='')
document.getElementById('divContents').innerHTML = '
';
x_get_product_tab('poster_id=2&tabName='+tabName+'&print_type=lfp', displayTabCont);
}
}
function displayTabCont(ret_value){
if(ret_value) {
return_value = ret_value.replace('+:','');
if(document.getElementById('divIdeasF'))
document.getElementById('divIdeasF').style.display = 'none';
if(document.getElementById('divDesigns'))
document.getElementById('divDesigns').style.display = 'none';
if(document.getElementById('flashVisual')) {
document.getElementById('flashVisual').className = 'hideVisual';
}
document.getElementById('divContents').innerHTML = return_value;
document.getElementById('divContents').style.display = '';
}
}
function showPricingTable(pType,pId) {
var htmlOutput = '';
var frameHeight = document.getElementById('container').offsetHeight;
var params = '¶ms=';
var xDoc = document.getElementsByTagName("*");
for (var i=0; i < xDoc.length; i++) {
if(xDoc[i].id.match(/tr_/)) {
if(xDoc[i].id=='tr_Folding') {
params += xDoc[i].id;
document.getElementById(xDoc[i].id).style.position = '';
}
if(xDoc[i].id=='tr_Die-Cutting') {
params += xDoc[i].id;
document.getElementById(xDoc[i].id).style.position = '';
}
}
}
htmlOutput += '';
window.scrollTo(0,0);
document.getElementById('pricingTable').innerHTML = htmlOutput;
}
// till here - mariz 6/23/2009
function switchPaper(pType, pNum){
for(var i=1; i <= pNum; i++){
if(i==pType){
document.getElementById('pLink'+i).className = 'sel';
}else{
document.getElementById('pLink'+i).className = '';
}
}
}
// For Confirm Size :: Reanne //
// for Confirm Size
function setSizeValues(jobType) {
if(document.getElementById('standardSize').style.display!='none') {
var standardSizeHtml = '';
if(document.getElementById('size_temp')) {
var standardObj = document.getElementById('size_temp');
standardSizeHtml += '';
}
document.getElementById('divSizeConfirm').innerHTML = standardSizeHtml;
document.getElementById('divSizeConfirm').style.display = '';
document.getElementById('divWidthHeightConfirm').style.display = 'none';
setUnit('standard');
}
if(document.getElementById('customSize').style.display!='none') {
var widthHeightHtml = '';
if(document.getElementById('width_temp')) {
widthHeightHtml += '';
}
widthHeightHtml += 'x';
if(document.getElementById('height_temp')) {
widthHeightHtml += '';
}
document.getElementById('divWidthHeightConfirm').innerHTML = widthHeightHtml;
document.getElementById('divWidthHeightConfirm').style.display = '';
document.getElementById('divSizeConfirm').style.display = 'none';
setUnit('custom');
}
if(jobType=='order') {
document.getElementById('confUpl').style.top = '65px';
document.getElementById('goButton').innerHTML = '';
} else if(jobType=='review') {
document.getElementById('confUpl').style.top = '130px';
document.getElementById('goButton').innerHTML = '';
}
}
function setSize(attrId, attrValue) {
if(document.getElementById(attrId))
document.getElementById(attrId).value = attrValue;
get_price_newdb_posters();
getLfpUpsxmlRates();
setSpecsLF();
showVisual();
}
function setCustomSize(attrId, attrValue, newAttrId) {
document.getElementById(newAttrId).value = attrValue;
get_price_newdb_posters();
getLfpUpsxmlRates();
setSpecsLF();
showVisual();
}
function setUnit(sizeType) {
if(sizeType=='custom') {
var unitInput = document.frm_poster.unit;
var unit = '';
for (var i=0; i < unitInput.length; i++) {
if (unitInput[i].checked==true) {
unit = unitInput[i].value;
}
}
if (unit=='in') {
document.getElementById('divUnit').innerHTML = 'Inches';
} else if (unit=='ft') {
document.getElementById('divUnit').innerHTML = 'Feet';
}
} else {
document.getElementById('divUnit').innerHTML = 'Inches';
}
}
var revCounter=0;
var revTime;
function slideReviews(revCount) {
if(revCounter==(revCount-1)){
revCounter=0;
}else{
revCounter++;
}
for(var i=0; i < revCount; i++) {
if(i==revCounter) {
if(document.getElementById('pReview_'+revCounter))
document.getElementById('pReview_'+revCounter).style.display = '';
} else {
if(document.getElementById('pReview_'+i))
document.getElementById('pReview_'+i).style.display = 'none';
}
}
tTime = setTimeout("slideReviews('"+revCount+"')",7000);
}