/*===================================* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE* DISCLAIMED.  IN NO EVENT SHALL THE PRODUCER OR* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF* SUCH DAMAGE.THE PRODUCER:Andreas ImhofEDV-DienstleistungenCH-Guemligen, Switzerlandwww.aiedv.chVersion: 5.5Version date: 20081101===================================*/var initial_display_mode=0;	// 0=Text display mode							// 1=JPEGvar display_mode_icon_border_high="solid #ADBFFA 2px";var display_mode_icon_border_dehigh="solid #FFFFFF 2px";var display_mode_icon_height="20px";var display_mode_icon_width="20px";var max_floaterchars_ifnot_loggedin=50;	// num chars to show when not logged in/* language dependent strings array where languages are like this:lg[0][0]="english";lg[0][1]="deutsch";lg[0][2]="francais";lg[0][3]="dansk";lg[0][4]="";	//4-7 are free: not currently translatedlg[0][5]="";lg[0][6]="";lg[0][7]=""; */var num_text_items=27;	//number of language dependent string array elementsvar lg=new Array(num_text_items);for (var i=0; i<num_text_items; i++) { lg[i]=new Array(4) }	//prepare sub-arrays for 8 languagesvar tag_s="<span style=\"color:#404080;font-size:10pt\"><b>";var tag_e="</b></span><br>";lg[0][0]=tag_s+"Display Mode:"+tag_e;			//the three items right of the page JPEG to set the display modelg[0][1]=tag_s+"Anzeige Modus:"+tag_e;lg[0][2]=tag_s+"Mode d'affichage:"+tag_e;lg[0][3]=tag_s+"Visningsform:"+tag_e;tag_s="<span style=\"color:#333333; font-size: 8pt; font-family: 'Verdana','Arial',sans-serif; white-space:nowrap;\">";tag_e="</span>";lg[1][0]=tag_s+"Article Text"+tag_e;lg[1][1]=tag_s+"Artikel Text"+tag_e;lg[1][2]=tag_s+"L'article en texte"+tag_e;lg[1][3]=tag_s+"Artikel i tekstform"+tag_e;tag_s="<span style=\"color:#333333; font-size: 8pt; font-family: 'Verdana','Arial',sans-serif; white-space:nowrap;\">";tag_e="</span>";lg[2][0]=tag_s+"Article JPEG"+tag_e;lg[2][1]=tag_s+"Artikel JPEG"+tag_e;lg[2][2]=tag_s+"L'article en JPEG"+tag_e;lg[2][3]=tag_s+"Artikel som jpg-billede"+tag_e;lg[3][0]=tag_s+"PDF"+tag_e;lg[3][1]=tag_s+"PDF"+tag_e;lg[3][2]=tag_s+"PDF"+tag_e;lg[3][3]=tag_s+"PDF"+tag_e;lg[4][0]=tag_s+"PDF"+tag_e;lg[4][1]=tag_s+"PDF"+tag_e;lg[4][2]=tag_s+"PDF"+tag_e;lg[4][3]=tag_s+"PDF"+tag_e;			//when article is displayed: the text in link anchor to the JPEG viewtag_s="<span style=\"font-family:'Verdana',sans-serif;font-size:8pt;font-weight:bold;color:#404080;background-color:#FFFFFF;text-decoration:none\">&#160;";tag_e="&#160;&#160;&raquo;</span>";lg[5][0]=tag_s+"Article JPEG"+tag_e;lg[5][1]=tag_s+"Artikel JPEG"+tag_e;lg[5][2]=tag_s+"Article JPEG"+tag_e;lg[5][3]=tag_s+"Artikel JPEG"+tag_e;			//when article is displayed: the text in link anchor to the PDF viewlg[6][0]=tag_s+"Article PDF"+tag_e;lg[6][1]=tag_s+"Artikel PDF"+tag_e;lg[6][2]=tag_s+"Article PDF"+tag_e;lg[6][3]=tag_s+"Artikel PDF"+tag_e;lg[8][0]="You must login to read articles!\n";lg[8][1]="Bitte anmelden um Artikel zu lesen!\n";lg[8][2]="Veuillez-vous inscrire pour lire des articles!\n";lg[8][3]="Du skal v\u00e6re logget ind for at benytte friteksts\u00f8gningen!";lg[9][0]="You must login to view PDFs!\n";lg[9][1]="Bitte anmelden um PDFs anzuzeigen!\n";lg[9][2]="Veuillez-vous inscrire pour afficher des PDF!\n";lg[9][3]="Du skal  v\u00e6re logget ind for at for at se PDF-filen!\n";lg[11][0]="Article as text";lg[11][1]="Artikel in Textform";lg[11][2]="L'article en texte";lg[11][3]="Artikel i tekstform";lg[12][0]="Article as JPEG";lg[12][1]="Artikel als JPEG";lg[12][2]="L'article en JPEG";lg[12][3]="Artikel som jpg-billede";lg[13][0]="Page PDF";lg[13][1]="Seiten-PDF";lg[13][2]="PDF de cette page";lg[13][3]="Side som PDF";lg[14][0]="";lg[14][1]="";lg[14][2]="";lg[14][3]="";lg[15][0]="<span style=\"font-family:'Verdana',sans-serif;font-size:12pt;font-weight:bold;color:red;\">You must enable Cookies and Session Cookies to use the Shop!</span>";lg[15][1]="<span style=\"font-family:'Verdana',sans-serif;font-size:12pt;font-weight:bold;color:red;\">Sie m\u00fcssen Cookies und Session-Cookies erlauben um den Shop zu benutzen!</span>";lg[15][3]="<span style=\"font-family:'Verdana',sans-serif;font-size:12pt;font-weight:bold;color:red;\">You must enable Cookies and Session Cookies to use the Shop!</span>";lg[15][4]="<span style=\"font-family:'Verdana',sans-serif;font-size:12pt;font-weight:bold;color:red;\">You must enable Cookies and Session Cookies to use the Shop!</span>";lg[20][0] = "Add this product to the cart";lg[20][1] = "Dieses Produkt in den Warenkorb legen";lg[20][2] = "Ajouter ce produit au panier";lg[20][3] = "Add this product to the cart";lg[21][0] = "This product has been added to the cart.";	//\n\nReturn to this catalogue to select more articles";lg[21][1] = "Das Produkt wurde in den Warenkorb gelegt.";	//\n\nKehren Sie zu diesem Katalog zur\u00fcck um weiter einzukaufen.";lg[21][2] = "Ce produit est maintenant dans le panier.";	//\n\nRetournez au catalogue pour continuer vos achats.";lg[21][3] = "This product has been added to the cart.";	//\n\nReturn to this catalogue to select more articles";lg[26][0]="Click to open full-text search window";lg[26][1]="Klicken um die Volltext-Suche zu \u00f6ffnen";lg[26][2]="Cliquer pour la recherche en text int&#xe9;gral";lg[26][3]="Benytte friteksts&#x0f8;gningen";//****** detect browser languagevar isIE = false;var cur_lang=null;	//	language as short text like de fr en - set default to englishvar cur_lang_ID=0;	//	language IDs:						//	0=en, 1=de, 2=fr, 3=da ....try { if ((parent.global.override_language!=null) && (parent.global.override_language!="")) cur_lang=parent.global.override_language; }catch(e){	try { if ((opener.parent.global.override_language!=null) && (opener.parent.global.override_language!="")) cur_lang=opener.parent.global.override_language; } catch(e){}}if (cur_lang==null) {	if (navigator.appName.toUpperCase().indexOf("EXPLORER")>-1) {		cur_lang=navigator.userLanguage;	//for Internet Explorer		cur_lang=cur_lang.substr(0,2);		isIE = true;	}	else {//like: " Mozilla/5.0 (Macintosh, U; PPC Mac OS X Mach-O; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6		//lets filter the 4th part - semicolon separated - within the ()		var start=navigator.userAgent.indexOf("(");		var end=navigator.userAgent.indexOf(")");		var verstr=navigator.userAgent.substring(start+1,end);		var parts=verstr.split("; ");		cur_lang=parts[3].substr(0,2);	}}switch (cur_lang) {	//make sure the translated texts are available, otherwise set english	case "de": cur_lang_ID=1; break;	case "fr": cur_lang_ID=2; break;	case "da": cur_lang_ID=3; break;	case "en": default:		cur_lang="en"; cur_lang_ID=0; break;}//****** write a language dependant image tagfunction img(id, src, the_class, style, lang, altID, titleID, onClick, onMouseOver, onMouseOut) {document.write('<img src="' + src + '"' +	((id!=null) ? (' id="'+id+'"') : ('')) +	((the_class!=null) ? (' class="'+the_class+'"') : ('')) +	((style!=null) ? (' style="'+style+'"') : ('')) +	((altID!=null) ? ((lang!=null) ? (' alt='+lg[altID][lang]) : (' alt='+lg[altID][lang])) : ' alt=""') +	((titleID!=null) ? ((lang!=null) ? (' title="'+lg[titleID][lang]+'"') : (' title="'+lg[titleID][cur_lang_ID]+'"')) : '') +	((onClick!=null) ? (' onClick="'+onClick+'"') : ('')) +	((onMouseOver!=null) ? (' onMouseOver="'+onMouseOver+'"') : ('')) +	((onMouseOut!=null) ? (' onMouseOut="'+onMouseOut+'"') : ('')) +	'>');return(null);}//****** set an attribute of an elementfunction sattr(elem_id, lang, attrname, attrcont) {if (lang) document.getElementById(elem_id).setAttribute(attrname,lg[attrcont][lang]);else document.getElementById(elem_id).setAttribute(attrname,lg[attrcont][cur_lang_ID]);return(null);}//****** get language dependant textfunction glt(item, lang, id) {if (id) {	if (lang) document.getElementById(id).innerHTML=lg[item][lang];	else document.getElementById(id).innerHTML=lg[item][cur_lang_ID];}else {	if (lang) document.write(lg[item][lang]);	else document.write(lg[item][cur_lang_ID]);}return(null);}//****** set the display mode icon style and textfunction set_initial_display_mode_icons(page,id_txt,id_jpg,id_pdf,id_info_txt,h,w) {var id_keystate='view_state_' + page;var key_state=parseInt(document.getElementById(id_keystate).innerHTML);if (id_txt) {	try {		if ((h==null) | (h>=0)) document.getElementById(id_txt).style.height=((h>0) ? h : display_mode_icon_height);		if ((w==null) | (w>=0)) document.getElementById(id_txt).style.width =((h>0) ? h : display_mode_icon_width);	} catch(e){}}if (id_jpg) {	try {		if (( h==null) | (h>=0)) document.getElementById(id_jpg).style.height=((h>0) ? h : display_mode_icon_height);		if (( w==null) | (w>=0)) document.getElementById(id_jpg).style.width =((h>0) ? h : display_mode_icon_width);	} catch(e){}}if (id_pdf) {	try {		if (( h==null) | (h>=0)) document.getElementById(id_pdf).style.height=((h>0) ? h : display_mode_icon_height);		if (( w==null) | (w>=0)) document.getElementById(id_pdf).style.width =((h>0) ? h : display_mode_icon_width);	} catch(e){}}if (initial_display_mode==0) {	//text display mode	if (id_txt) try { document.getElementById(id_txt).style.border=display_mode_icon_border_high; } catch(e){}	if (id_jpg) try { document.getElementById(id_jpg).style.border=display_mode_icon_border_dehigh; } catch(e){}	try { document.getElementById(id_info_txt).innerHTML=lg[1][cur_lang_ID]; } catch(e){}	document.getElementById(id_keystate).innerHTML="0";} else {	//JPEG display mode	if (id_txt) try { document.getElementById(id_txt).style.border=display_mode_icon_border_dehigh; } catch(e){}	if (id_jpg) try { document.getElementById(id_jpg).style.border=display_mode_icon_border_high; } catch(e){}	try { document.getElementById(id_info_txt).innerHTML=lg[2][cur_lang_ID]; } catch(e){}	document.getElementById(id_keystate).innerHTML="1";}return(null);}//*********************************//Change here to suit floater stuffvar use_custom_floater=1;	//set this to 1 to use floater look below, 0 = use from style class							//set to 0 to use default gray boxvar floater_width=200;		//set to width in pixels like 200var floater_height=0;		//set to 0var floater_bott=50;		//minimal offset from bottom window//the title partvar floater_TIT_border="4px solid #eeeeee";	//set to "" to use default "1px solid #222222"var floater_TIT_backgroundColor="#eeeeee";	//set to "" to use default "#DDDDDD"var floater_TIT_font="Verdana, Arial, sans-serif";	//set to "" to use default "sans-serif"var floater_TIT_fontsize="8pt";				//set font size like "11pt"var floater_TIT_fontweight="bold";			//set font weight like "normal" or "bold"//the text partvar floater_border="4px solid #eeefff";	//set to "" to use default "1px solid #222222"var floater_backgroundColor="#eeefff";	//set to "" to use default "#DDDDDD"var floater_font="Verdana, Arial, sans-serif";	//set to "" to use default "sans-serif"var floater_fontsize="8pt";				//set font size like "11pt"var floater_fontweight="normal";		//set font weight like "normal" or "bold"var mf_thick=2;				//the thickness of hor/vert coloured lines marking an articlevar mf_color="#0073BC";		//color main article framingvar mf_color2="#8DAE6A";	//color continued article framingvar floater_offset=10;var view_X=10;var view_Y=10;//****** var cur_tit="";var cur_txt="";var tmr=null;		//our floater update intervall timervar layerstyle=null;	//the floating shurtcut layer's stylevar frameHstyle;	//horizontal article framing layer's stylevar frameVstyle;	//verticalvar frameHoffset=0;var frameVoffset=0;var scrollbars=2;var my=0, mx=0;		//current mouse positionvar floater_is_visible=false;var floater_is_inited=false;var floater_is_floating = false;var in_floater=false;var current_coords=null;	//coords as string "x1,y1,x2,y2"var co=null;				//coords as array x1,y1,x2,y2var current_obj=null;var current_obj_id=null;var current_page;var current_page_number;var current_pageside;var have_to_hide=false;var browser_name;var operating_system="WIN";var F=null;var floater_current_objID="";var off='hidden';var on='visible';var t_obj; var t_id; var t_page; var t_scale; var t_jpg; var t_xml; var t_func; var t_tit; var t_txt; var t_areas; var t_hasWWWlink; var t_hasExtPDF; var t_the_pagenumber;var theimage_recall=0;var callerbox=1;//=========function nMouse(event){	if (event == null) return;	try {		my=event.pageY; mx=event.pageX;		//document.getElementById('info').innerHTML = "event:" + event + "\nN mouse x/y: " + mx + "/" + my + " .....in_floater: " + in_floater;	} catch(e){};	if (floater_is_floating) draw_floater(callerbox);}function iMouse() {	if (event == null) return;	try {		my=event.y; mx=event.x;		//document.getElementById('info').innerHTML = "event:" + event + "\nI mouse x/y: " + mx + "/" + my + " .....in_floater: " + in_floater;	} catch(e){};	if (floater_is_floating) draw_floater(callerbox);}function nKey(event){ return; }function iKey(){ return; }//****** detect browservar browser_version=navigator.appVersion;var userAgent=navigator.userAgent;do { //detect browser	if (navigator.appName.toUpperCase().indexOf("MSIE")>-1) { browser_name='EXPLORER'; break; }	if (navigator.appName.toUpperCase().indexOf("EXPLORER")>-1) { browser_name='EXPLORER'; break; }	if (userAgent.toUpperCase().indexOf("SAFARI")>-1) { browser_name='NETSCAPE'; break; }	if (userAgent.toUpperCase().indexOf("FIREFOX")>-1) { browser_name='FIREFOX'; break; }	browser_name='NETSCAPE'; break; //assume Mozilla Gecko} while(false);do { //detect operating system	if (userAgent.toUpperCase().indexOf("WINDOWS")>-1) { operating_system="WIN"; break; }	if (userAgent.toUpperCase().indexOf(" OS X")>-1) { operating_system="OSX"; break; }	else operating_system="MAC";} while(false);do {	// set event handlers	if (browser_name=='NETSCAPE' || browser_name=='FIREFOX') {		document.onmousemove=nMouse;		document.onkeydown=document.onkeyup=nKey;		scrollbars=20;		break;	}	//all others	document.onmousemove=iMouse;	document.onkeydown=document.onkeyup=iKey;} while(false);function btn(idtxt) { //get page# from idtxtvar id, id_keystate="";current_page=idtxt.substr(idtxt.lastIndexOf('_')+1);id_keystate="view_state_" + current_page;do {	if (idtxt.indexOf("btn_1_")>-1) {		try { document.getElementById(id_keystate).innerHTML="0"; } catch(e){}		try { id='info_text_1_' + current_page; document.getElementById(id).innerHTML=lg[1][cur_lang_ID]; } catch(e){}		try { id='icn_1_' + current_page; document.getElementById(id).style.border=display_mode_icon_border_high; } catch(e){}		try { id='icn_2_' + current_page; document.getElementById(id).style.border=display_mode_icon_border_dehigh; } catch(e){}		break;	}	if (idtxt.indexOf("btn_2_")>-1) {		try { document.getElementById(id_keystate).innerHTML="1"; } catch(e){}		try { id='info_text_1_' + current_page; document.getElementById(id).innerHTML=lg[2][cur_lang_ID]; } catch(e){}		try { id='icn_2_' + current_page; document.getElementById(id).style.border=display_mode_icon_border_high; } catch(e){}		try { id='icn_1_' + current_page; document.getElementById(id).style.border=display_mode_icon_border_dehigh; } catch(e){}		break;	}} while(false);}//=========function show_article_xml(obj,id,scale,jpg,xml,hasWWWlink,hasExtPDF,the_pagenumber) {/*try {	if (F && !F.closed)  {	//this is for browser compatibility		F.close(); F=null;		t_obj=obj; t_id=id; t_scale=scale; t_jpg=jpg; t_xml=xml; t_hasWWWlink=hasWWWlink; t_hasExtPDF=hasExtPDF; t_the_pagenumber=the_pagenumber;		setTimeout('recallshow_article_xml()',100);		return;	}}catch(e) {	F=null;	t_obj=obj; t_id=id; t_scale=scale; t_jpg=jpg; t_xml=xml; t_hasWWWlink=hasWWWlink; t_hasExtPDF=hasExtPDF;	setTimeout('recallshow_article_xml()',100);	return;}try { F.close(); } catch(e){}F=null;*/var wid=400, hig=400;var articleID = "Art" + id + "_" + the_pagenumber;var elements=document.getElementsByTagName("object");var artobj=document.getElementById(articleID);if (!artobj) {	//is not available: do nothing	return;}// checkm if we can display the article content right of flipping pagesvar articleDisplayTD = document.getElementById("articleDisplayTD");if (articleDisplayTD != null) {	// max window height	var max_text_height = 768;	//if (!isIE) {	if (true) {		do {			if (!isNaN(window.innerHeight)) { max_text_height = parseInt(window.innerHeight); break; }			if (!isNaN(document.documentElement.clientHeight)) { max_text_height = parseInt(document.documentElement.clientHeight); break; }			if (!isNaN(top.document.body.offsetHeight)) { max_text_height = parseInt(top.document.body.offsetHeight); break; }			if (!isNaN(top.document.body.clientHeight)) { max_text_height = parseInt(top.document.body.clientHeight); break; }			// sh.....			max_text_height = parseInt(document.body.offsetHeight);		} while(false);		/*		alert("window.innerHeight: " + window.innerHeight +			"\ndocument.documentElement.clientHeight: " + document.documentElement.clientHeight +			"\ntop.document.body.offsetHeight: " + top.document.body.offsetHeight +			"\ntop.document.body.clientHeight: " + top.document.body.clientHeight +			"\npagesetTD_0: " + document.getElementById('pagesetTD_0').style.height +			"\nmax_text_height: " + max_text_height			);		*/		max_text_height -= 100;	}	else {	// IE shit		max_text_height = parseInt(document.getElementById("pagesetTD_0").style.height) + 22;	}	articleDisplayTD.style.height = max_text_height + "px";	var content = artobj.innerHTML;	// replace commented image links <!--imgage src="image.jpg" alt="iamge.eps"/image-->	// either quirked by flipbook.xsl in browser or by transformer	var re = /\<!--image/gi;	content = content.replace(re,"<img");	re = /\/image--\>/gi;	content = content.replace(re,">");	// add click for PDF to img tags	content = add_image_pdf_click(content);	// replace link data and other stuff	content = redirect_oscommerce_links(content);	var articleDisplayWidth = 0;	var minTextWidth = 250;	if (typeof(dhtmlwindow) != "undefined") {		//document.getElementById('drag-contentarea').innerHTML = content;		var winwidth = 'width=' + Math.max(document.getElementById("articleDisplayTD").offsetWidth - 7,minTextWidth) + "px,";		var winheight = 'height=' + max_text_height + "px,";		try {			if (document.getElementById("drag-contentarea") != null) winheight = winwidth = '';	// set width/height first call only		} catch(e) {}		var divwin=dhtmlwindow.open('divbox', 'div', null, content, '', winwidth + winheight + 'resize=1,scrolling=1',false,true);		articleDisplayWidth = divwin.offsetWidth;		//return;	}	else {		var spacer = "<div style=\"line-height:2px; width:250px; background-color:#f7f7ff\">&nbsp;</div>";		articleDisplayTD.innerHTML = spacer + content;		articleDisplayWidth = articleDisplayTD.offsetWidth;	}	var needWidth = parseInt(document.getElementById('pagesetTD_0').width) + parseInt(document.getElementById('pagesetTD_1').width) + minTextWidth;	/*alert("articleDisplayWidth:"+articleDisplayWidth		+ "\nminTextWidth:"+minTextWidth		+ "\nneedWidth:"+needWidth		+ "\ndocument.body.offsetWidth:"+document.body.offsetWidth		);*/	if (true /*isIE*/) {		if (parseInt(document.body.offsetWidth) < needWidth) {			window.moveTo(10, 20);			window.resizeBy(needWidth - parseInt(document.body.offsetWidth) + 50, 0);		}	}	else {		if (articleDisplayWidth < minTextWidth) {			window.moveTo(10, 20);			window.resizeBy(minTextWidth - articleDisplayWidth + 10, 0);		}	}/*	alert("pagesetTD_0: " + document.getElementById('pagesetTD_0').width		+ "\npagesetTD_1: " + document.getElementById('pagesetTD_1').width		+ "\narticleDisplayWidth: " + articleDisplayWidth		+ "\nwindow.innerWidth: " + window.innerWidth		+ "\nneedWidth: " + needWidth		+ "\ndocument.body.offsetWidth: " + document.body.offsetWidth		+ "\nisIE: " + isIE		);*/}else {	//this is used for direct epaper/article display within a new window	var enc=document.getElementById("doctypeinfos").getAttribute("enc");	F=window.open("","myArticleWindow","screenX=" + view_X + ", screenY=" + view_Y + ", left=" + view_X + ", top=" + view_Y + ", width=" + wid + ",height=" + hig + ",resizable=Yes,scrollbars=Yes,status=No,toolbar=No,menubar=No");	F.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r');	F.document.write('<html><head>\r');	F.document.write('<title>Article Text </title>\r');	F.document.write('<meta http-equiv="Content-Type" content="text/html; charset='+ enc +'">\r');	F.document.write('<script language="javascript" type="text/javascript" src="../DTDCSS/XTXPepaperF.js"></script>\r');	F.document.write('<link rel="StyleSheet" href="' + document.getElementById("doctypeinfos").innerHTML + '" type="text/css" media="all">\r</head>\r<body onMouseUp="click_func(0)" onKeyUp="click_func(0)">\r');		//the div to display the www and mail icons	F.document.write('<div id="qm_func" style="visibility:hidden; position: fixed; top: 0px; right: 0px; cursor: pointer; border: 0px solid #000000; height: 0px; vertical-align: middle; font-family: Verdana; font-size: 9pt; text-align: left;">');	F.document.write('<img border="0" id="qm_func1" align="top" src="../DTDCSS/earth.gif" vspace="1" hspace="1" style="cursor: pointer; height: 22px; background-color: transparent; vertical-align: middle" alt=""    title="web"    onMouseOver="sub_f(1,1)" onMouseOut="sub_f(1,0)" onClick="sub_do(1)">');	F.document.write('<img border="0" id="qm_func2" src="../DTDCSS/email.gif" vspace="1" hspace="1" style="cursor: pointer; height: 22px; background-color: transparent; vertical-align: middle" alt="" title="e-mail" onMouseOver="sub_f(2,1)" onMouseOut="sub_f(2,0)" onClick="sub_do(2)">');	F.document.write('</div>');		//the article's text	F.document.write('<div style="float: left;border: 0px solid #0000FF; ">');	F.document.write(artobj.innerHTML);	F.document.write('</div>');	F.document.writeln("\r</body></html>");	F.document.close();	F.focus();}return;}function recallshow_article_xml() {show_article_xml(t_obj,t_id,t_scale,t_jpg,t_xml,t_hasWWWlink,t_hasExtPDF,t_the_pagenumber);return;}function show_clicked_article() {	// get article idx	var id_split = current_obj_id.split("_");	var art_idx = id_split[1].substr(1);/*alert("current_obj: " + current_obj	+ "\ncurrent_page: " + current_page	+ "\ncurrent_obj_id: " + current_obj_id	+ "\nart_idx: " + art_idx	);*/	show_article_xml(current_obj,art_idx,'','','','','',current_page);}//=========function show_article_jpg(obj,id,page,scale,jpg,xml,hasWWWlink,hasExtPDF,the_pagenumber) {var id_keystate='view_state_' + page;var key_state=0;try { key_state=parseInt(document.getElementById(id_keystate).innerHTML);}catch(e){}if (key_state==0) {	show_article_xml(obj,id,scale,jpg,xml,hasWWWlink,hasExtPDF,the_pagenumber)	return;}if (!jpg || jpg=="") return;t_obj=obj; t_id=id; t_page=page; t_scale=scale; t_jpg=jpg; t_xml=xml; t_hasWWWlink=hasWWWlink; t_hasExtPDF=hasExtPDF; t_the_pagenumber=the_pagenumber;try {	if (F && !F.closed)  {	//browser compatibility		F.close(); F=null;		setTimeout('recallshow_article_jpg()',100);		return;	}}catch (e) {		F=null;		setTimeout('recallshow_article_jpg()',100);		return;}var wid=100, hig=100;F=window.open("","jpg"," screenX=" + view_X + ", screenY=" + view_Y + ", left=" + view_X + ", top=" + view_Y + ", width=" + wid + ", height=" + hig + ", resizable=Yes,scrollbars=Yes");F.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');F.document.write('<html><head><title>Article JPEG </title></head><body>');if (hasWWWlink) {	F.document.writeln("<a style=\"text-decoration:none;\" target=\"_blank\" ");	F.document.writeln(" href=\"http://" + hasWWWlink + "\" title=\""  + hasWWWlink + "\">");}F.document.write('<img style="border: 0px solid #FFFFFF" src="' + jpg + '" name="myjpg" id="myjpg" alt="Article JPEG">');if (hasWWWlink) {	F.document.writeln("</a>");}if ((hasExtPDF!=null) & (hasExtPDF!="")) {	//this is a PDF created external with GhostScript	F.document.writeln("<br><a style=\"text-decoration:none;\" href=\"" + hasExtPDF + "\" title=\"PDF\">" + lg[6][cur_lang_ID] + "</a>");}F.document.writeln("</body></html>");F.document.close();show_jpg(t_jpg);return;}function recallshow_article_jpg() {	show_article_jpg(t_obj,t_id,t_page,t_scale,t_jpg,t_xml,t_hasWWWlink,t_hasExtPDF);	return;}//=========function show_jpg(jpg) {if (!F.document.getElementById("myjpg").complete) {	var wait_display=true;	if (navigator.userAgent.toUpperCase().indexOf("SAFARI")>-1) {	//for Safari		if (F.document.myjpg.width>0) wait_display=false;	}	else wait_display=true;	if (wait_display && theimage_recall<50) {		setTimeout('show_jpg(t_jpg)',100);		theimage_recall++;		return;	}}theimage_recall=0;var wid=100, hig=100;wid=F.document.images[0].width + 25;hig=F.document.images[0].height + 45;if (operating_system =='WIN') { wid += 25; hig += 25; }if (hig>parseInt(screen.availHeight)-50) hig=parseInt(screen.availHeight)-50;if (wid>parseInt(screen.availWidth)-50) hig=parseInt(screen.availWidth)-50;if (wid<100) wid=100;if (hig<100) hig=100;F.resizeTo(wid,hig);F.focus();return;}function show_current_article() {setTimeout(current_obj.href,50);}//=========var floater_recalled = false;var floater_t_obj = null;var floater_t_func = null;var floater_t_tit = null;var floater_t_txt = null;var floater_t_areas = null;var floater_timeoutID = null;function recallfloater() {	floater_recalled = true;	floater(floater_t_obj,floater_t_func,floater_t_tit,floater_t_txt,floater_t_areas);	floater_recalled = false;return;}function floater(obj,func,tit,txt,areas) {//document.getElementById("info").innerHTML = "floater obj:'" + obj + "',func: " + func + ", areas:'"  + areas + "'";if ((func == 0) && !floater_recalled && !isIE) {	// give the onMouseOver on canvas some time	floater_t_obj=obj; floater_t_func=func; floater_t_tit=tit; floater_t_txt=txt; floater_t_areas=areas;	floater_timeoutID = setTimeout('recallfloater()',120);	return;}//window.clearTimeout(floater_timeoutID);if (func == 10) {	mouseOnCanvas = true;	return;}try {	if (page_is_flipping) {		hide_floater();		if (canvas_available) clear_all_shadows();		return;	}} catch(e){}if (!floater_is_inited) {	t_obj=obj; t_func=func; t_tit=tit; t_txt=txt; t_areas=areas;	init_floater(t_obj,t_func,t_tit,t_txt,t_areas);	return;}if (!obj) return;current_obj=obj;current_obj_id = obj.id;current_coords=obj.coords;current_page_number = obj.id.substr(1,obj.id.indexOf("_")-1);current_pageside = isEven(current_page_number) ? 'L_' : 'R_';current_page=obj.id.substr(obj.id.lastIndexOf('_')+1);current_page_offsetLeft = getLeftPos(document.getElementById("page" + current_pageside + "1",true));current_page_offsetTop = getTopPos(document.getElementById("page" + current_pageside + "1",true));if ( (canvas_available == true) ) {	//document.getElementById("info").innerHTML = "floater func: " + func + ":"  + current_pageside + ": " + areas + "<br>&nbsp;&nbsp;&nbsp;&nbsp;" + txt;	if (mouseOnCanvas && (func == 0)) return;	// this comes from <area onMouseOut="floater(this,0)"...>							// shoots always when the canvas is drawn and overlays article	cur_tit=tit; cur_txt=txt;	var retval = areashadow(func,current_pageside,obj,areas);	return;}else {	if (!obj.coords) { hide_floater(); return; }	co=obj.coords.split(","); //start x,y, end x,y	//document.getElementById('info2').innerHTML = "Layer on page: " + current_obj.id + ", left: " + current_obj.offsetLeft;		var id='float_lineH' + current_pageside + "1"; frameHstyle=document.getElementById(id).style;	id='float_lineV' + current_pageside + "1"; frameVstyle=document.getElementById(id).style;}callerbox=func;var fl=parseInt(layerstyle.left);var ft=parseInt(layerstyle.top);var fb=parseInt(layerstyle.top)+parseInt(document.getElementById("float_container").offsetHeight);var fr=parseInt(layerstyle.left)+parseInt(layerstyle.width);switch (func) {case 0: //check if cursor is on floater	if (browser_name=='NETSCAPE' || browser_name=='FIREFOX') ;	else { iMouse(); }/*document.getElementById('info1').innerHTML = "current_obj.id: " + current_obj.id + "<br>" 			+ "current_pageside: " + current_pageside + ", current_page_offsetLeft: " + current_page_offsetLeft + "<br>" 			+ "Floater l/t/r/b: " + fl + "/" + ft + "/" + fr + "/" + fb + "<br>" 			;*/	if ((mx+1>=fl) && (mx-1<=fr) && (my+1>=ft) && (my-1<=fb)) { in_floater=true; break; } //we are within floater	in_floater=false;	have_to_hide=true;	hide_floater();	break;case 1:	//article startscase 2:	//for chained textboxes	in_floater=false;	cur_tit=tit; cur_txt=txt;	if (!floater_is_visible) update_floater(callerbox);	//call this only if not already visible	break;}//document.getElementById('info1').innerHTML = "in_floater: " + in_floater;return;}//=========function update_floater(func) {if (!floater_is_inited) return;if (have_to_hide) { hide_floater(); return; }if (mx<0) {	tmr=setTimeout('update_floater(callerbox)',50);	return; //do nothing, mouse is not in window}if (tmr) { clearTimeout(tmr); tmr=null; }var fl=parseInt(layerstyle.left);var ft=parseInt(layerstyle.top);var fb=parseInt(layerstyle.top)+parseInt(document.getElementById("float_container").offsetHeight);var fr=parseInt(layerstyle.left)+parseInt(layerstyle.width);if ((mx+1>=fl) && (mx-1<=fr) && (my+1>=ft) && (my-1<=fb))  {	in_floater=true;	return;}in_floater=false;//document.getElementById('info1').innerHTML = "UPDATE in_floater: " + in_floater;var x=mx, y=my;	//store mouse positiondraw_floater();if (func==1) frameVstyle.backgroundColor=frameHstyle.backgroundColor=mf_color;else frameVstyle.backgroundColor=frameHstyle.backgroundColor=mf_color2;//draw the framing boxesframeHstyle.left=parseInt(co[0])+frameHoffset-mf_thick+"px";frameHstyle.top=parseInt(co[1])+frameVoffset-mf_thick+"px";frameHstyle.width=co[2]-co[0]+(2*mf_thick)+"px";frameHstyle.height=mf_thick+"px";frameHstyle.visibility=on;frameVstyle.left=parseInt(co[0])+frameHoffset-mf_thick+"px";frameVstyle.top=parseInt(co[1])+frameVoffset+"px";frameVstyle.width=mf_thick+"px";frameVstyle.height=co[3]-co[1]+mf_thick+"px";frameVstyle.visibility=on;}function draw_floater() {	if (!cur_tit && !cur_txt) return;		//text preview floater stuff	x=mx; y=my;	if (browser_name=="EXPLORER") {	//any Microsoft Explorer		if (operating_system=='MAC') {	//Explorer macintosh			x=mx + document.body.scrollLeft;			y=my + document.body.scrollTop;		}		else {	//Explorer Windows			x += current_page_offsetLeft;			y += current_page_offsetTop;		}	}	//reposition the floater	/*	document.getElementById('info1').innerHTML = "Mouse x/y: " + mx + "/" + my + "<br>" 				+ "current_pageside: " + current_pageside + ", current_page_offsetLeft: " + current_page_offsetLeft + "<br>" 				+ "Floater l/t: " + x + "/" + y + "<br>" 				;	*/	var lposx;	var lposy;	if (current_pageside == "L_") {		lposx = (x+floater_offset)+"px";		lposy = (y+floater_offset)+"px";	}	else {		lposx = (x-parseInt(layerstyle.width)-floater_offset)+"px";		lposy = (y+floater_offset)+"px";	}	if (layerstyle.top!=lposy) layerstyle.top=lposy;	if (layerstyle.left!=lposx) layerstyle.left=lposx;			//change text in floater if different article	if (floater_current_objID!=current_obj.id) {		var logged_in=true; //are we logged in?		try { logged_in=parent.loginwin.chklog(); }		catch(e) { try { if(opener)logged_in=opener.parent.loginwin.chklog(); }catch(e){} }			var tit="";		var txt=cur_txt;		var re=/\+\+/g;		txt=txt.replace(re,"+");		re=/\+\+/g;		txt=txt.replace(re,"+");		while (txt.charAt(0) == "+") txt = txt.substr(1,txt.length);	// cut leading CR		var pos=txt.indexOf("+");		var pos1=txt.indexOf("-",0);		var pos2=txt.indexOf("\\-",0);		if (pos2>=0) pos1=txt.indexOf("-",pos2+2);		//if ( (pos<0) || ((pos1>=0) && (pos1<pos)) ) pos=pos1;		if (pos>60) pos=-1;	//does not really seem to be a title	/* commented to not to show a title		if (pos>=0) {			tit=txt.substr(0,pos);			txt=txt.substring(pos+1,255);		}	*/		if (!logged_in) {txt=txt.substr(0,max_floaterchars_ifnot_loggedin);txt+="....";}		re=/\\-/g;		tit=tit.replace(re,"-");		txt=txt.replace(re,"-");		re=/\+/g;		txt=txt.replace(re,"<br>");		//document.getElementById('info').innerHTML = "tit: " + tit + "<br>" + "txt: " + txt + "<br>";		if (tit =="") document.getElementById('float_tit').style.visibility = "hidden";		else {			document.getElementById('float_tit').style.visibility = "visible";			document.getElementById('float_tit').innerHTML=tit;		}		document.getElementById('float_txt').innerHTML=txt + (txt.length>=240 ? "..." : "");	}		//layerstyle.overflow="visible";	layerstyle.overflow="hidden";	// cut very long lines	layerstyle.visibility=on;	floater_is_visible=true;	floater_is_floating = true;	floater_current_objID=current_obj.id;		var fl=parseInt(layerstyle.left);	var ft=parseInt(layerstyle.top);	var fb=parseInt(layerstyle.top)+parseInt(document.getElementById("float_container").offsetHeight);	var fr=parseInt(layerstyle.left)+parseInt(layerstyle.width);	if ((x+1>=fl) && (x-1<=fr) && (y+1>=ft) && (y-1<=fb)) in_floater=true;	else in_floater=false;	return;}function init_floater(obj,func,tit,txt,areas) {try {	layerstyle=document.getElementById('float_container').style;} catch (e) {	t_obj=obj; t_func=func; t_tit=tit; t_txt=txt; t_areas=areas;	setTimeout('init_floater(t_obj,t_func,t_tit,t_txt,t_areas)',50);	return;}if (use_custom_floater > 0) {	var fltr;	layerstyle.border="0px solid #000000";	layerstyle.backgroundColor="transparent";	fltr=document.getElementById('float_inner');	fltr.style.border="0px solid #000000";	fltr.style.margin="0px";	//set custom floater for title part	if (floater_border!="") {		fltr=document.getElementById('float_tit');		fltr.style.margin="0px";		fltr.style.overflow="visible";		fltr.style.border=floater_TIT_border;		fltr.style.backgroundColor=floater_TIT_backgroundColor;	}	if (floater_TIT_backgroundColor != "") fltr.style.backgroundColor=floater_TIT_backgroundColor;	if (floater_font!="") { document.getElementById('float_tit').style.fontFamily=floater_TIT_font; }	if (floater_fontsize!="") { document.getElementById('float_tit').style.fontSize=floater_TIT_fontsize; }	if (floater_fontweight!="") { document.getElementById('float_tit').style.fontWeight=floater_TIT_fontweight; }	//set custom floater for text part	if (floater_border!="") {		fltr=document.getElementById('float_txt');		fltr.style.margin="0px";		fltr.style.overflow="visible";		fltr.style.border=floater_border;	}	if (floater_backgroundColor != "") fltr.style.backgroundColor=floater_backgroundColor;	if (floater_font!="") { document.getElementById('float_txt').style.fontFamily=floater_font; }	if (floater_fontsize!="") { document.getElementById('float_txt').style.fontSize=floater_fontsize; }	if (floater_fontweight!="") { document.getElementById('float_txt').style.fontWeight=floater_fontweight; }}else {	//use from given style sheet//	floater_width=parseInt(layerstyle.width);//	floater_height=parseInt(layerstyle.height);//	floater_bott=0;}if (operating_system=="WIN") { scrollbars=20; }layerstyle.visibility=off;layerstyle.top=0+"px";layerstyle.left=-10000+"px";layerstyle.width=floater_width + "px";floater_is_inited=true;floater(t_obj,t_func,t_tit,t_txt,t_areas);return;}//=========function hide_floater(force) {if (!force && in_floater) return;have_to_hide=false;floater_current_objID="";if (tmr) { clearTimeout(tmr); tmr=null; }try {	layerstyle.visibility=off;	layerstyle.top=0+"px";	layerstyle.left=-10000+"px";	//document.onmousemove=null;	//document.onkeydown=document.onkeyup=null;/*	frameHstyle.visibility=off;	frameHstyle.top=frameHstyle.left=frameHstyle.width=frameHstyle.height=0+"px";	frameVstyle.visibility=off;	frameVstyle.top=frameVstyle.left=frameVstyle.width=frameVstyle.height=0+"px";*/	var fltH = document.getElementById('float_lineHL_1').style	var fltV = document.getElementById('float_lineVL_1').style	fltH.visibility=off;	fltH.top=fltH.left=fltH.width=fltH.height=0+"px";	fltV.visibility=off;	fltV.top=fltV.left=fltV.width=fltV.height=0+"px";	fltH = document.getElementById('float_lineHR_1').style	fltV = document.getElementById('float_lineVR_1').style	fltH.visibility=off;	fltH.top=fltH.left=fltH.width=fltH.height=0+"px";	fltV.visibility=off;	fltV.top=fltV.left=fltV.width=fltV.height=0+"px";} catch(e) {}floater_is_visible=false;floater_is_inited=false;floater_is_floating = false;return;}function isEven(x) {	return (x%2)?false:true;}function c() {var l=true;try{l=parent.loginwin.chklog();}catch(e){try{l=opener.parent.loginwin.chklog();}catch(e){}}return(l);}function a() {alert(lg[8][cur_lang_ID])}function p() {alert(lg[9][cur_lang_ID]);return(false)}// ******* add click for PDF to img tagsfunction add_image_pdf_click(thestr) {	if ((thestr == null) || (thestr == "")) return(thestr);	if (thestr.indexOf("<img ") < 0) return(thestr);	if (thestr.indexOf(".pdf") < 0) return(thestr);	str = thestr;	var re_img = null;	try {	// old IE 6 cant understand this		re_img = new RegExp("<img (.)*?\>","gi");		// get html <img .....> construct		var imagetags = re_img.exec(str);	// get all image tags into array		if ((imagetags == null) || (imagetags[0] == "")) return(thestr);		var brk = 0;		// just a security counter if the regexp can not replace some signatures		for (var i = 0; i < imagetags.length; i++) {			var alt_re = new RegExp("alt=\"(.)*?\"","gi");		// get content of alt attr construct			var altattrs = alt_re.exec(imagetags[i]);			if ((altattrs == null) || (altattrs[0] == "")) continue;			var altattr = "" + altattrs[i];	// the whole alt="xxx.pdf" string			var re = new RegExp("\.pdf","gi");			var pos = altattr.search(re);			if (pos < 0) continue;			// original is a pdf file			var re = /"(.)*"/;				// get the pdf name in the alt attribute			var pdf_re = re.exec(altattr);		// the pdf name only			var pdf = "" + pdf_re[0];		// ... as string			re = /"/g;						// remove double quotes			pdf = pdf.replace(re,"");			// replace the <img ...> with <a href="pdf"><img...></a>			var new_image = imagetags[i].replace(/style="/gi,"title=\"PDF\" style=\"border:0;");			var new_img_lnk = "<a style=\"text-decoration:none\" href=\"" + pdf + "\" target=\"_blank\">" + new_image + "</a>";			//alert("imagetags: " + imagetags + "\n\naltattr: " + altattr + "\npos: " + pos + "\npdf: " + pdf+ "\n\nnew_img_lnk: " + new_img_lnk);			re = new RegExp(imagetags[i],"gi");			str = str.replace(re, new_img_lnk);			// go to next img alt construct			if (brk > 1000) break;			brk++;		}	}	catch (e) { return (str); }	return(str);}// ******* redirect certain oscommerce linksfunction redirect_oscommerce_links(thestr) {	if ((thestr == null) || (thestr == "")) return(thestr);	if (thestr.indexOf("<a ") < 0) return(thestr);	str = thestr;	var re_lnk = null;	try {	// old IE 6 cant understand this		re_lnk = new RegExp("<a (.)*?\>","gi");		// get html <a href.....> construct		//re_lnk = /<a (.)*?\>/gi;		// get html <a href.....> construct	}	catch (e) { return (str); }	var a_link_re = re_lnk.exec(str);	var i = 0;		// just a security counter if the regexp can not replace some signatures	var last_found_pos = -1;	while ((a_link_re != null) && (a_link_re[0] != "")) {		var a_link = "" + a_link_re[0];	// the whole <a...> begin link string		var source_string = "advanced_search_result.php.keywords=";		var replace_string = "index\.php\?action=buy_now\&products_id=";		var re = new RegExp(source_string,"gi");		var pos = a_link.search(re);		//alert(a_link + "\n\n" + source_string + "\n\n" + pos);		if (pos >= 0) {			re = /href="(.)*"/;	// get the href attribute			var href_re = re.exec(a_link);			var href = "" + href_re[0];		// the whole href attribute			re = /"(.)*"/;					// get the url in the href attribute			var url_re = re.exec(href);		// the url only			var url = "" + url_re[0];		// ... as string			re = /"/g;						// remove double quotes			url = url.replace(re,"");			// change the progam call 'advanced_search_result.php?keywords=123456' to 'index.php?action=buy_now&products_id=123456'			re = new RegExp(source_string,"gi");			var new_url = url.replace(re,replace_string);						var new_link = "\<a href=\"javascript\:callURL('" + new_url + "',true,'ebshopwin')\" onClick=\"alert(lg[21][cur_lang_ID])\" title=\"" + lg[20][cur_lang_ID] + "\"\>";				re = /\?/g;						// escape ?			var esc_a_link = a_link.replace(re,"\\?");			var rex = new RegExp(esc_a_link);	// the whole original link must be replaced with the new link			str = str.replace(rex, new_link);				/*			re = /</g;			var lnk= a_link.replace(re,"W");			re = />/g;			lnk= lnk.replace(re,"W");			Response.Write(lnk + "<br>");			Response.Write(href + "<br>");			Response.Write(new_url + "<br>");			Response.Write(new_link + "<br>");			return;			*/		}		// find next html link construct		if (i > 1000) break;		a_link_re = re_lnk.exec(str);		i++;	}	return (str);}var visibleWindow = null;function callURL(url, show_in_new_window, windowname) {	if ( (url == null) || (url == "") ) return;	if (show_in_new_window == true) {		visibleWindow = window.open("",windowname,"width=900,height=600,top=20,left=10,location=Yes,resizable=Yes,scrollbars=Yes,status=Yes,toolbar=Yes,menubar=Yes");		visibleWindow.location.href = url;		visibleWindow.focus();		//alert("visibleWindow: " + windowname);	}	else {		//alert("windowname: " + windowname);		try {			var win = top.document.getElementById(windowname);			win.location.href = url;		} catch(e) {}	}	return;}/******************************************** * canvas stuff to draw a shadow on article area(s) */var canvas_available = false;var canvasL = new Array();var canvasR = new Array();var canvasVisible = false;var mouseOnCanvas = false;var xd = 0;//1;var yd = 0;//0;var wd = 3;//1;var hd = 3;//0;function init_canvas() {/* currently disabled: working on it	var ie_is_inited = ieCanvasInit();	if (ie_is_inited) {	}*/	var num_canvas = 0;	var canvas_side_idx = 0; // left side canvas	while (canvas_side_idx < 2) {		num_canvas = 0;		var canvas_side = "";		if (canvas_side_idx == 0) canvas_side = "L";		else canvas_side = "R";		while (true) {			try {				var canvas_id = "areacanvas" + canvas_side + "_" + num_canvas;				if (canvas_side_idx == 0) {					canvasL[num_canvas] = document.getElementById(canvas_id);					if (canvasL[num_canvas] == null) { canvasL.length -= 1; break; }					canvasL[num_canvas].style.zIndex = 0;					var ctx = canvasL[num_canvas].getContext("2d");	// check if supported				}				else {					canvasR[num_canvas] = document.getElementById(canvas_id);					if (canvasR[num_canvas] == null) { canvasR.length -= 1; break; }					canvasR[num_canvas].style.zIndex = 0;					var ctx = canvasR[num_canvas].getContext("2d");	// check if supported				}			} catch (e) { break; }			num_canvas++;		}		canvas_side_idx++;	}	if (num_canvas <= 0) {		//document.getElementById("info").innerHTML += "   no canvas support";		canvas_available = false;	}	else {		canvas_available = true;		//document.getElementById("info").innerHTML = "canvas is supported with number of canvas: " + num_canvas;	}	return (canvas_available);}function clear_all_shadows() {	var canvas_side_idx = 0; // left side canvas	while (canvas_side_idx < 2) {		var canvas_side = "";		var the_canvas = null;		if (canvas_side_idx == 0) {			canvas_side = "L";			num_canvas = canvasL.length;			the_canvas = canvasL;		}		else {			canvas_side = "R";			num_canvas = canvasR.length;			the_canvas = canvasR;		}		var idx = 0;		while (idx < num_canvas) {			try {				drawshadow(the_canvas[idx],0);				the_canvas[idx].style.zIndex = 0;			} catch (e) { break; }			idx++;		}		canvas_side_idx++;	}	mouseOnCanvas = false;}function drawshadow(the_canvas,func,x,y,w,h) {	if (the_canvas == null) return(false);	var ctx = the_canvas.getContext("2d");	if (func == 1) {		ctx.fillStyle = "rgba(200,200,220,0.3)";		ctx.fillRect (x, y, w, h);		canvasVisible = true;		//alert("x: " + x + ", y:" + y + ", w: " + w + ", h: " + h);	}	else {		ctx.clearRect(0,0,the_canvas.width,the_canvas.height);		canvasVisible = false;		//alert("CLEAR xo: " + xo + ", yo:" + yo + ", wo: " + wo + ", ho: " + ho);	}	return(true);}function areashadow(func,page_side,obj,areas) {	//document.getElementById("info1").innerHTML = "areashadow:" + func + ": " + func + ": " + page_side + ": " + areas;	if (!canvas_available) return(false);	if ( (canvasL == null) || (canvasR == null) ) return(false);	clear_all_shadows();	if (func <= 0) {		hide_floater();		//document.getElementById("info2").innerHTML = "areashadow CLEAR";		return(true);	}	var coords_arr = null;	if ( (areas != null) && (areas != "") ) {		coords_arr = areas.split(";");	}	else {		//document.getElementById("info2").innerHTML = "NO areas";		return(false);	}	if (!coords_arr) {		return(true);	}	draw_floater();	//document.getElementById("info1").innerHTML = "";	for (var i = 0; i < coords_arr.length; i++) {		var the_canvas = null;		if (page_side == "L_") the_canvas = canvasL;		if (page_side == "R_") the_canvas = canvasR;		if ( the_canvas == null) {			//alert("canvas error for page_side '" + page_side + "'");			return(false);		}		if (i >= the_canvas.length) break;		//document.getElementById("info1").innerHTML = coords_arr.length + " / " + i + " / " + coords_arr[i];		var coords = coords_arr[i].split(",");	// l,t,r,b		//document.getElementById("info1").innerHTML = coords_arr.length + " / " + i + " / " + coords_arr[i] + " / " + coords;		var l = parseInt(coords[0]);		var t = parseInt(coords[1]);		var w = parseInt(coords[2]) - parseInt(coords[0]);		var h = parseInt(coords[3]) - parseInt(coords[1]);		//document.getElementById("info1").innerHTML = the_canvas.length + "/the_canvas:" + i + " / " + coords;		the_canvas[i].style.zIndex = 1000000;		the_canvas[i].left = l + xd;		the_canvas[i].top = t + yd;		the_canvas[i].width = w + wd;		the_canvas[i].height = h + hd;		the_canvas[i].style.left = (l+xd) +"px";		the_canvas[i].style.top = (t+yd) +"px";		the_canvas[i].style.width = (w+wd) +"px";		the_canvas[i].style.height = (h+hd) +"px";		drawshadow(the_canvas[i],1, 0, 0, w+wd, h+hd);	}	return;}function ieCanvasInit(htcFile) {	/*	 * Only proceed if browser is IE 6 or later (as all other major browsers	 * support canvas out of the box there is no need to try to emulate for	 * them, and besides only IE supports VML anyway.	 */	var ie, opera, a, nodes, i, oVml, oStyle, newNode;	ie = navigator.appVersion.match(/MSIE (\d\.\d)/);	opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);	if ((!ie) || (ie[1] < 6) || (opera)) {		return(false);	}	/*	 * Recreate elements, as there is no canvas tag in HTML	 * The canvas tag is replaced by a new one created using createElement,	 * even though the same tag name is given the generated tag is slightly	 * different, it's created prefixed with a XML namespace declaration	 * <?XML:NAMESPACE PREFIX ="PUBLIC" NS="URN:COMPONENT" />	 */	nodes = document.getElementsByTagName('canvas');	for (i = 0; i < nodes.length; i++) {		node = nodes[i];		if (node.getContext) { return(false); } // Other implementation, abort		newNode = document.createElement('canvas');		newNode.id = node.id;		newNode.style.width  = node.width;		newNode.style.height = node.height;		node.parentNode.replaceChild(newNode, node);	}	/* Add VML includes and namespace */	document.namespaces.add("v");	oVml = document.createElement('object');	oVml.id = 'VMLRender';	oVml.codebase = 'vgx.dll';	oVml.classid = 'CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E';	document.body.appendChild(oVml);	/* Add required css rules */	if ((!htcFile) || (htcFile == '')) { htcFile = 'iecanvas.htc'; }	oStyle = document.createStyleSheet();	oStyle.addRule('canvas', "behavior: url('" + htcFile + "');");	oStyle.addRule('v\\:*', "behavior: url(#VMLRender);");	return(true);	// we have inite IE canvas it}
