var observer = {}; var counter = 1; observer.nextEffect = false;
observer.onPostEffect = function(e){if (this.nextEffect) {var eff = this.nextEffect; setTimeout(function(){eff.start();}, 10);} this.nextEffect = false;}
function myPanelsSlides(currentPanel)
{//The list of all the panels that need sliding
	// var panels = [<cfloop from="1" to="#ceiling(attributes.recordcount/2)#" index="ii"><cfif ii GT 1>,</cfif>'slide#ii#'</cfloop>]; --->
	var opened = -1; // Let's check if we have an effect for each of these sliding panels
	if (typeof effects == 'undefined') effects = {};
	for (var i=0; i < panels.length; i++)
	{if (typeof effects[panels[i]] == 'undefined'){effects[panels[i]] = new Spry.Effect.Slide(panels[i], {duration: 2000, from: '0%', to: '100%', toggle: true});effects[panels[i]].addObserver(observer);}
		if (effects[panels[i]].direction == Spry.forwards && currentPanel != panels[i])
			opened = i;// prevent too fast clicks on the buttons
		if (effects[panels[i]].direction == Spry.backwards && effects[panels[i]].isRunning)
		{observer.nextEffect = effects[currentPanel];return;}
	}if (opened != -1) {observer.nextEffect = effects[currentPanel];effects[panels[opened]].start();} else if (effects[currentPanel].direction != Spry.forwards){effects[currentPanel].start();}
}
function panelSlides(currentPanel)
{if (typeof effects == 'undefined') effects = {};
	if (typeof effects['shipmethods'] == 'undefined') {effects['shipmethods'] = new Spry.Effect.Slide('shipmethods', {duration: SlideDuration, from: '0%', to: '100%', toggle: true});} effects['shipmethods'].start();
}
function next() {
	myPanelsSlides("slide" + counter); counter = counter + 1;
	if (counter == panelsMaxCounter) {counter = 1;}
	if (panelsCounter > 2){setTimeout('next()', 8000);}
}
function nextField(elmnt,content,nextField)
{if (content.length==elmnt.maxLength){if (document.forms(0).elements[nextField].value ==''){document.forms(0).elements[nextField].focus();}}}
function LinkConvert(element,action,button)
	{if (action != '') {script = 'javascript:ActionSubmit(\'' + action + '\')';}
		else {script = 'FormSubmit()';}
			if (document.forms[0].k.value < 16 || document.forms[0].k.value > 17) 
			// alert(button);
			{if ((button < 2 && (navigator.userAgent.toLowerCase().indexOf('msie')!=-1 || navigator.userAgent.toLowerCase().indexOf('avant')!=-1)) || (button < 1 && navigator.userAgent.toLowerCase().indexOf('msie')==-1) || (button = 1 && navigator.userAgent.toLowerCase().indexOf('safari')!= -1)|| (button = 0 && navigator.userAgent.toLowerCase().indexOf('chrome')!= -1))
			{document.forms[0].action = element.href; element.href='javascript:' + script; window.status= element;}
	}
}
function linkclear(element) {
	window.status=''; innerContent = element.innerHTML; //quickfix for IE
	element.href = previouslink; element.innerHTML = innerContent; //quickfix for IE with @ in the title
	document.forms[0].action = requesthandler;
}
function urlEncode(inputString){var encodedInputString = inputString;encodedInputString=encodedInputString.replace("+", "%2B");encodedInputString=encodedInputString.replace("/", "%2F"); encodedInputString=encodedInputString.replace("?", "%3F");encodedInputString=encodedInputString.replace("&", "%26");return encodedInputString;}
function changeimage (url,fieldname,imageID)
	{fullurl = url.replace('thumbs','full');fullurl2 = document.mainimage.src;fullurl2 = fullurl2.replace('full','thumbs');
	index2 = 0;link2 = 0;document.mainimage.src = fullurl;index1 = 0;
	for(a = 0; a < document.links.length; a++)
		{if(document.links[a].name == fieldname){link2 = document.links[a].href;text2 = document.links[a].text;index2 = a;}
		if(document.links[a].name == 'main'){link1 = document.links[a].href;text1 = document.links[a].text;index1 = a;}}
		if (index1 != 0) {document.links[index1].href = link2;}
		if (document.links[index2].style.visibility == 'hidden' && document.links[index1].style.visibility == 'visible') {document.links[index1].style.visibility = 'hidden';}
		else if (document.links[index1].style.visibility == 'hidden' && document.links[index2].style.visibility == 'visible') {document.links[index1].style.visibility = 'visible';}
	}
function xxlimage (imageID,filetype)
{destination = baseurl + '/xxlimage.cfm?imageID=' + imageID + '&filetype=' + filetype;newWindow = window.open (destination,'xxl','width=800,height=600,fullscreen=0,resizable=YES,scrollbars=YES,toolbar=no,left=250,top=250,status=no,directories=no,menubar=no,location=no');newWindow.focus();}
function searchLink(){var queryString = 'suchergebnisse.htm?q=' + urlEncode(document.forms[0].q.value);document.forms[0].action = queryString;}
var imgTimeOut;var previousImageID = 0;
function hideImage(imageID){if(div = document.getElementById('divImage' + imageID)){}}
var imgTimeOut;var div;
function createImage(){div = document.createElement('div');div.id = 'divImage';div.style.backgroundImage = 'url("../interface/conf_wait.gif")';div.style.display = 'none';document.body.appendChild(div);}
function createPopup(){divDialog = document.createElement('div');divDialog.id = 'divDialog';divDialog.style.display = 'none';document.body.appendChild(divDialog);}
function hideImage(){window.clearTimeout(imgTimeOut);if(div = document.getElementById('divImage')){div.style.display='none';}}
function popupImage(image){var imgUrl = image;
	div = document.getElementById('divImage');div.style.position = 'absolute';
	div.style.backgroundColor = 'silver';div.style.backgroundPosition = 'top left';
	div.style.backgroundRepeat = 'no-repeat';div.style.backgroundImage = 'url("../interface/conf_wait.gif")';
	div.style.border = '1px outset';
	if(div.hasChildNodes()){div.removeChild(div.childNodes[0]);}
	img = document.createElement('img');img.style.padding='1px';img.src = imgUrl;
	div.appendChild(img);div.style.display = 'block'
}
var hideFlag = 1;
function hideDialog(){if (hideFlag == 1){divDialog.style.display='none';}}
function setValue(flag){hideFlag = flag}
function popupDialog(ID){
	document.getElementById('divDialog').innerHTML = '';
	divDialog = document.getElementById('divDialog');
	divDialog.style.position = 'absolute';
	if(divDialog.hasChildNodes()){divDialog.removeChild(divDialog.childNodes[0]);}
	divDialog.style.display = 'block';
	document.getElementById(ID).appendChild(divDialog);
	html = '<table border="0" cellpadding="0" cellspacing="0" style="background:;border:0px;padding:0px;margin: 0px;background-color:;"><tr style="background:;border:0px;padding:0px;margin: 0px;background-color:;"><td style="background:;border-left:0px;border-top:0px;border-bottom:0px;padding: 0px 0px 0px 0px;margin: 0px;background-color:;"><div><div class="boxHeadGray"><div></div></div><div class="boxBody"><ul class="menu2">';
		for (var iii=1;iii < arguments.length;iii++){
		switch (arguments[iii]) {
		case 1:html = html + '<li><a href="javascript:ConfirmSubmit(\'act_auctions_sec_del:auctionIDs=' + ID + '\',\'Wollen Sie die Auktion wirklich l&ouml;schen?\')" onmouseover="setValue(0)" onmouseout="setValue(1)">L&ouml;schen</a></li>';break;
		case 2:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_cancel:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">L&ouml;schen</a></li>';break;
		case 3:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_activateselected:auctionIDs=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Wiedereinstellen</a></li>';break;
		case 4:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_edit:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">&Auml;ndern</a></li>';break;
		case 5:html = html + '<li><a href="javascript:ActionSubmit(\'act_products_sec_edit_auction:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">&Auml;ndern</a></li>';break;
		case 6:html = html + '<li><a href="javascript:ActionSubmit(\'act_bids_sec_create:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Mitbieten</a></li>';break;
		case 7:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_list_byaccount_auction:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Alle Auktionen des Anbieters</a></li>';break;
		case 8:html = html + '<li><a href="javascript:ActionSubmit(\'act_whishlist_sec_del:auctionIDs=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Aus Liste entfernen</a></li>';break;
		case 9:html = html + '<li><a href="javascript:ActionSubmit(\'act_offerings_sec_create:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Preis vorschlagen</a></li>';break;
		case 10:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_buy:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Sofort kaufen</a></li>';break;
		case 11:html = html + '<li><a href="javascript:ActionSubmit(\'act_itemGroups_sec_add_auctions:itemGroupTypeID=1|auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Zu Liste hinzuf&uuml;gen</a></li>';break;
		case 12:html = html + '<li><a href="javascript:ConfirmSubmit(\'act_products_sec_del:prodID=' + ID + '\',\'Wollen Sie den Artikel wirklich l&ouml;schen?\')" onmouseover="setValue(0)" onmouseout="setValue(1)">L&ouml;schen</a></li>';break;
		case 13:html = html + '<li><a href="javascript:ActionSubmit(\'act_products_sec_edit:prodID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">&Auml;ndern</a></li>';break;
		case 14:html = html + '<li><a href="javascript:ActionSubmit(\'act_itemGroups_sec_add_auctions:itemGroupTypeID=2|prodID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Zu Liste hinzuf&uuml;gen</a></li>';break;
		case 15:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_add_notice:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Notiz hinzuf&uuml;gen</a></li>';break;
		case 16:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_question_auction:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Verk&auml;ufer kontaktieren</a></li>';break;
		case 17:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_view:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Versand</a></li>';break;
		case 18:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_payment:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Bezahlen</a></li>';break;
		case 19:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_edit:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Bewerten</a></li>';break;
		case 20:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_edit_notice:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Notiz hinzuf&uuml;gen</a></li>';break;
		case 21:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_archive:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Ins Archiv verschieben</a></li>';break;
		case 22:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_question:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Handelspartner kontaktieren</a></li>';break;
		case 23:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_archive_remove:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Aus Archiv entfernen</a></li>';break;
		case 24:html = html + '<li><a href="javascript:ActionSubmit(\'act_orders_sec_payment:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Bezahlen</a></li>';break;
		case 25:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_copy2:copyType=order|orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Wieder verkaufen</a></li>';break;
		case 26:html = html + '<li><a href="javascript:ActionSubmit(\'act_products_sec_edit_notice:prodID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Notiz hinzuf&uuml;gen</a></li>';break;
		case 27:html = html + '<li><a href="javascript:ActionSubmit(\'act_auctions_sec_copy2:auctionID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">&Auml;hnlichen Artikel einstellen</a></li>';break;
		case 28:html = html + '<li><a href="javascript:ActionSubmit(\'act_accounts_sec_address:orderID=' + ID + '\')" onmouseover="setValue(0)" onmouseout="setValue(1)">Versand</a></li>';break;
				}
			}
	html = html + '</ul></div><div class="borderBottom" style="margin-bottom:0px;"><div></div></div></div></td></tr></table>';
	document.getElementById('divDialog').innerHTML = html;
	divDialog.style.marginLeft = '-' + (document.getElementById('divDialog').offsetWidth - 40) + 'px';
}
function followImage(event){
	if(div = document.getElementById('divImage')){
	if(document.all){if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {div.style.left = event.clientX + document.documentElement.scrollLeft + 8 + 'px';div.style.top = event.clientY + document.documentElement.scrollTop - 86 + 'px';}
	else{div.style.left = event.clientX + document.body.scrollLeft + 8 + 'px';div.style.top = event.clientY + document.body.scrollTop - 86 + 'px';}}else{div.style.left = event.pageX + 86 +'px';div.style.top = event.pageY + 86 +'px';}}}
function LinkSet(element) {previouslink = element.href;}
function unflag(criteria) {
	if (criteria == 2 && document.forms[0].crit[criteria].checked == true) {document.forms[0].crit[3].checked = false;}
	if (criteria == 3 && document.forms[0].crit[criteria].checked == true) {document.forms[0].crit[2].checked = false;}
	if (criteria == 6 && document.forms[0].crit[criteria].checked == true) {document.forms[0].crit[5].checked = false;}
	if (criteria == 5 && document.forms[0].crit[criteria].checked == true) {document.forms[0].crit[6].checked = false;}
}
function timer(){
	time = new Date();time = new Date(time.getTime() + dif);
	hour = ( time.getHours() > 9 ) ? time.getHours() : "0"+time.getHours();min = ( time.getMinutes() > 9 ) ? time.getMinutes() : "0"+time.getMinutes();
	sec = ( time.getSeconds() > 9 ) ? time.getSeconds() : "0"+time.getSeconds();day = ( time.getDate() > 9 ) ? time.getDate() : "0"+time.getDate();
	month = ( (time.getMonth()+1) > 9 ) ? (time.getMonth()+1) : "0"+(time.getMonth()+1);year = time.getYear() - 2000 ;
	document.getElementById('serverTime').innerHTML = hour + ":" + min + ":" + sec +" Uhr";setTimeout("timer();", 1000);
}

function formchanged (){document.form.form_changed.value = 'yes';}
function errfocus (fieldname){document.forms[0].elements[fieldname].focus();}
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=10}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}
function help(destination,win_name,win_dim){window.open (baseurl + '/' + destination ,win_name,win_dim + ',' + 'resizable=yes,scrollbars=yes,toolbar=no,Left=250,Top=250,status=no,directories=no,menubar=no,location=tabelle');}
function SetChecked(name) 
{dml=document.forms[0];len = dml.elements.length;
	var i=0;
	for( i=0 ; i<len ; i++) 
	{if (dml.elements[i].name == name){dml.elements[i].checked=dml.checkall.checked;}}
}
function ConfirmSubmit(action,message){if (confirm(message) == true){ActionSubmit(action);}}
function ParameterSubmit(action){var crit = event.srcElement.options[event.srcElement.selectedIndex].value;document.forms[0].action = document.forms[0].action + '?crit=' + crit + "&" + parameter;ActionSubmit(action);}
function CategorySelect(fieldname)
	{var categoryID = document.forms[0].elements[fieldname].options[document.forms[0].elements[fieldname].selectedIndex].value;
	action = 'act_auctions_list_categories:categoryID=' + categoryID;document.forms[0].action = 'kategorie.cfm?categoryID=' + categoryID;ActionSubmit(action);
}
function CategorySelectSearch(fieldname){var categoryID = document.forms[0].elements[fieldname].options[document.forms[0].elements[fieldname].selectedIndex].value;action = 'act_shared_none:categoryID=' + categoryID;ActionSubmit(action);}
function HelpSelect(fieldname){var helpID = document.forms[0].elements[fieldname].options[document.forms[0].elements[fieldname].selectedIndex].value;action = 'act_help_refresh:helpID=' + helpID;ActionSubmit(action);}

function ProdCatSelect(fieldname,shopID)
	{
		var categoryID = document.forms[0].elements[fieldname].options[document.forms[0].elements[fieldname].selectedIndex].value;
		action = 'act_auctions_list_shops:prodCatID=' + categoryID;
		document.forms[0].action = 'shop-kategorie.htm?&shopID=' + shopID + '&prodCatID=' + categoryID;
		ActionSubmit(action);
}
// Aktion über URL-Variable verschicken.
var submitRunning = 0;
function ActionSubmit(action) {document.forms[0].jsaction.value = action;if (submitRunning == 0){submitRunning = 1;document.forms[0].submit();}else tmp = window.setTimeout('document.forms[0].submit();',200);}
function FormSubmit(action) {if (submitRunning == 0){submitRunning = 1;document.forms[0].submit();} else tmp = window.setTimeout('document.forms[0].submit();',200);}
function formsubmit(action,message) {
	if (message != '')
		{if (confirm (message) == true){document.forms[0].action = document.forms[0].action + "?action=" + action;document.forms[0].submit();}}
	else {document.forms[0].action = document.forms[0].action + "?action=" + action;document.forms[0].submit();}
}
function checksearch() {var searchlen = document.forms[0].searchterm.value; if(searchlen == ""){alert("Bitte geben Sie einen Suchbegriff ein!");} else {ActionSubmit('act_auctions_search');}}
function popitup(win_name,win_dim) {window.open (cublink,win_name,win_dim + ',' + 'resizable=yes,scrollbars=yes,toolbar=no,Left=250,Top=250,status=no,directories=no,menubar=no,location=tabelle');}
function newWindow(destination,win_name,win_dim) {window.open (baseurl + '/' + destination ,win_name,win_dim + ',' + 'resizable=yes,scrollbars=yes,toolbar=no,Left=250,Top=250,status=no,directories=no,menubar=no,location=tabelle');}
function calc_pot(a,b,c,e,g){
	var fehler = false;
	document.forms[0].msg_voraussetzung.value="";
	var d = document.forms[0].zeitpunkt.value;
	var d = d.replace(/,/,".");
	if(d == ""){
		document.forms[0].msg_zeitpunkt.value = "Bitte einen Betrag eingeben.";var fehler = true;
		}
		else if(isNaN(d) == true){
			document.forms[0].msg_zeitpunkt.value = "Bitte nur Betraege eingeben.";var fehler = true;
		}
		else if(d.indexOf(".")!=-1&&(d.indexOf(".")>d.length-3||d.indexOf(".")<d.length-3)){
			document.forms[0].msg_zeitpunkt.value = "Bitte nur richtige Betraege eingeben.";var fehler = true;
		}
		else if(parseFloat(d)>e){
			document.forms[0].msg_zeitpunkt.value = "Der Preis muss kleiner als der aktuelle Preis sein.";var fehler = true;
		}
		if(fehler==false){
		var spanne = a-b;
		var spanne2 = a-parseFloat(d);
		var laufzeit = c*24*60*60*1000;
		var laufzeit2 = Math.round((laufzeit/spanne)*spanne2);
		var Jahr = parseInt(g.substr(0,4));
		if(parseInt(g.substr(5,2))==0){var Monat = parseInt(g.substr(6,1))-1;}else{var Monat = parseInt(g.substr(5,2))-1;}
		if(parseInt(g.substr(8,2))==0){var Tag = parseInt(g.substr(9,1));}else{var Tag = parseInt(g.substr(8,2));}
		if(parseInt(g.substr(11,2))==0){var Stunden = parseInt(g.substr(12,1));}else{var Stunden = parseInt(g.substr(11,2));}
		if(parseInt(g.substr(14,2))==0){var Minuten = parseInt(g.substr(15,1));}else{var Minuten = parseInt(g.substr(14,2));}
		if(parseInt(g.substr(17,2))==0){var Sekunden = parseInt(g.substr(18,1));}else{var Sekunden = parseInt(g.substr(17,2));}
		var heute = new Date(Jahr,Monat,Tag,Stunden,Minuten,Sekunden);
		var heute_time = heute.getTime();
		var dann_time = heute_time + laufzeit2;
		heute.setTime(dann_time);
		var wochentag = heute.getDay();
		if(wochentag==0){f="Sonntag";}
		else if(wochentag==1){f="Montag";}
		else if(wochentag==2){f="Dienstag";}
		else if(wochentag==3){f="Mittwoch";}
		else if(wochentag==4){f="Donnerstag";}
		else if(wochentag==5){f="Freitag";}
		else if(wochentag==6){f="Samstag";}
		
		var tag = heute.getDate();
		var monat = heute.getMonth()+1;
		var jahr = heute.getYear();
		var std = heute.getHours();
		var minu = heute.getMinutes();
		var sek = heute.getSeconds();
		var tagausgabe  = ((tag < 10) ? "0" + tag : tag);
		var monatausgabe  = ((monat < 10) ? "0" + monat : monat);
		var stdausgabe  = ((std < 10) ? "0" + std : std);
		var minuausgabe  = ((minu < 10) ? "0" + minu : minu);
		var sekausgabe  = ((sek < 10) ? "0" + sek : sek);
		document.forms[0].msg_zeitpunkt.value="Der Preis ist erreicht am "+f+", den "+tagausgabe+"."+monatausgabe+"."+jahr+" um "+stdausgabe+":"+minuausgabe+" Uhr und "+sekausgabe+" Sekunden.";
		document.forms[0].msg_voraussetzung.value="Voraussetzung ist hierbei, dass der Preis bis zum angegebenen Preis faellt.";		
		}
	}
function printContentDiv(){
		var gAutoPrint = true;
		if (document.getElementById != null){
			var html = '<HTML>\n<HEAD>\n';
			if (document.getElementsByTagName != null){
				var headTags = document.getElementsByTagName("head");
				if (headTags.length > 0) html += headTags[0].innerHTML;
			}
			html += '\n</HE' + 'AD>\n<BODY>\n';
			var printReadyElem = document.getElementById("printDiv");
			if (printReadyElem != null) html += printReadyElem.innerHTML;
			else{
				alert("Error, no contents.");return;
			}
			html += '\n</BO' + 'DY>\n</HT' + 'ML>';
			var printWin = window.open("","printDiv");
			printWin.document.write(html);
			if (gAutoPrint) printWin.print();
		} else alert("Browser not supported.");
	}
function openContentDiv(){
		var gAutoPrint = true;
		if (document.getElementById != null){
			var html = '<HTML>\n<HEAD>\n';
			if (document.getElementsByTagName != null){var headTags = document.getElementsByTagName("head");if (headTags.length > 0) html += headTags[0].innerHTML;}
			html += '\n</HE' + 'AD>\n<BODY>\n';
			var printReadyElem = document.getElementById("contentDiv");
			if (printReadyElem != null) html += printReadyElem.innerHTML;
			else{alert("Error, no contents.");return;}
			html += '\n</BO' + 'DY>\n</HT' + 'ML>';
			var printWin = window.open("","printDiv");
			printWin.document.write(html);
			if (gAutoPrint) printWin.print();
		} else alert("Browser not supported.");
	}

