var uid = new Date().getTime();
var flashProxy = new FlashProxy(uid, 'images/JavaScriptFlashGateway.swf');
var designer = new SWFObject("images/designer.swf", "designer", "740", "390", "8","#ffffff");
var getmysvg=false;
var designersichtbar=0;
var svguptodate=true;
var gotohome=true;
function init() {
//window.resizeTo(920,710);
ax_showcontent(currpage);
var anim = new SWFObject("images/animation.swf", "anim", "280", "64", "8","transparent");
anim.addParam("wmode", "transparent");
anim.write("topanimation");
/*designer.addParam("wmode", "transparent");*/
designer.addVariable('bg_url',flashbackgroundimage);
designer.addVariable('bg_width',740);
designer.addVariable('bg_height',392);
designer.addVariable('bg_x',0);
designer.addVariable('bg_y',0);
designer.addVariable("config", "script/designerconfig.xml");
designer.addVariable('lcId',uid);
designer.addVariable('callsvgphp','transmitsvg.php');
if(disableupload) designer.addVariable('dontShowUpload', true);
if(currpage=="kaufen_fehler_zahlung") {
x_ax_getgeraetside(ax_getgeraetside_cb);
x_ax_getmotivside(ax_getmotivside_cb);
}
}
function showladr(showladr) {
if(!showladr) {
showdiv("ladr");
document.getElementById("ladranders").value=1;
} else {
hidediv("ladr");
document.getElementById("ladranders").value=0;
}
}
function checkgentyp() {
if(document.getElementById("gen_typ").value=="eckig") document.getElementById("gen_radius").value="0";
document.getElementById("gen_typ_img").src="images/"+document.getElementById("gen_typ").value+".png";
}
function ax_selectnotebook_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
if(new_data=="A") showdiv("fehlermsgbox");
else if(new_data=="B") showdiv("fehlermsgbox2");
else if(new_data=="C") showdiv("fehlermsgbox3");
else if(new_data=="D") showdiv("fehlermsgbox4");
else ax_selectgeraet(new_data);
}
function ax_selectnotebook() {
x_ax_selectnotebook(alldata(),ax_selectnotebook_cb);
}
function ax_zahlart_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
document.getElementById("zahlartauswahl").innerHTML=new_data;
}
function ax_versand_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
help=new_data.split("|");
document.getElementById("vkosten").innerHTML=help[0];
document.getElementById("gswert").innerHTML=help[1];
document.getElementById("gsumme").innerHTML=help[2];
x_ax_zahlart(ax_zahlart_cb);
}
function ax_versand() {
x_ax_versand(alldata(),ax_versand_cb);
}
function showupload(showuploader) {
if(showuploader) showdiv("fileuploader");
else hidediv("fileuploader");
}
function ax_getsvgfromdb3_cb(new_data) {
svguptodate=true;
}
function ax_getsvgfromdb2_cb(new_data) {
ax_showcontent("pruefen_upload");
}
function startUpload() {
ax_showcontent("pruefen_upload");
}
function adduploadfile(datei) {
ax_showdesigner();
flashProxy.call('createPictureShape',datei);
hidediv("loading");
}
function ax_getsvgfromdb_cb(new_data) {
ax_showcontent("pruefen");
}
function goToOrder() {
document.getElementById("content").innerHTML="
";
flashProxy.call('getSvg', 'ok');
x_ax_getsvgfromdb(ax_getsvgfromdb_cb);
}
function ax_clearstage_cb(new_data) {
x_ax_getmotivside(0,ax_getmotivside_cb);
}
function clearStage() {
x_ax_clearstage(ax_clearstage_cb);
}
function alldata() {
data="";
for(i=0;i";
}
if(designersichtbar=1 && document.getElementById("designer")) {
document.getElementById("designer").style.width="0px";
document.getElementById("designer").style.height="0px";
document.getElementById("flashdesigner").style.width="0px";
document.getElementById("flashdesigner").style.height="0px";
showdiv("content");
designersichtbar=0;
document.getElementById("content").innerHTML="
";
}
x_ax_showcontent(page, ax_showcontent_cb);
placemenu(page);
ax_showbottomnav( page );
}
function ax_showcontent_cb(new_data) {
document.getElementById("content").innerHTML=new_data;
}
function placemenu( page ) {
hidediv("menu_pos");
if(page.substr(0,6)=="geraet") { document.getElementById("menu_pos").style.top="5px"; showdiv("menu_pos"); }
if(page.substr(0,5)=="motiv") { document.getElementById("menu_pos").style.top="97px"; showdiv("menu_pos"); }
if(page.substr(0,7)=="pruefen") { document.getElementById("menu_pos").style.top="190px"; showdiv("menu_pos"); }
if(page.substr(0,8)=="designer") { document.getElementById("menu_pos").style.top="190px"; showdiv("menu_pos"); }
if(page.substr(0,6)=="kaufen") { document.getElementById("menu_pos").style.top="286px"; showdiv("menu_pos"); }
}
function openagb() {
second=window.open("vorlagen/agb.pdf","AGB","width=800,height=600");
second.focus();
}
function opensite(openurl) {
second=window.open(openurl,"WEBSITESITE");
second.focus();
}
function ax_showbottomnav( page ) {
x_ax_showbottomnav(page, ax_showbottomnav_cb);
}
function ax_showbottomnav_cb(new_data) {
document.getElementById("bottomnav").innerHTML=new_data;
}
function ax_geraetesucheauswahl() {
if(document.getElementById("frm_geraet").value=="") {
document.getElementById("geraetewahl").innerHTML="";
} else {
help=document.getElementById("frm_geraet").value.split("-");
ax_showgeraet(help[1], help[0], 0);
}
}
function ax_geraetsuche_cb(new_data) {
document.getElementById("geraetewahl").innerHTML=new_data;
}
function ax_geraetsuche() {
x_ax_geraetsuche(document.getElementById("frm_phersteller").value,ax_geraetsuche_cb);
}
function ax_showgeraetekat(katnr, start) {
x_ax_showgeraetekat( katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'geraet_' ) ;
}
function ax_showgeraete(katnr, start) {
x_ax_showgeraete( katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'geraetekatliste_'+katnr ) ;
}
function ax_showgeraet(geraetnr, katnr, start) {
x_ax_showgeraet(geraetnr, katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'geraeteliste_'+katnr+'_'+start );
}
function ax_getgeraetside_cb(new_data) {
document.getElementById("menu_g_over").innerHTML='
';
showdiv("menu_g_over");
}
function ax_selectgeraet(geraetnr) {
x_ax_selectgeraet(geraetnr, ax_showcontent_cb );
x_ax_getgeraetside(geraetnr,ax_getgeraetside_cb);
}
function ax_showmotivekat(katnr, start) {
if(designersichtbar=1 && document.getElementById("designer")) {
document.getElementById("designer").style.width="0px";
document.getElementById("designer").style.height="0px";
document.getElementById("flashdesigner").style.width="0px";
document.getElementById("flashdesigner").style.height="0px";
showdiv("content");
designersichtbar=0;
document.getElementById("content").innerHTML="
";
}
placemenu('motiv');
x_ax_showmotivekat( katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'motiv_' ) ;
}
function ax_showmotive(katnr, start) {
x_ax_showmotive( katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'motivekatliste_'+katnr );
}
function ax_showmotiv(motivnr, katnr, start) {
x_ax_showmotiv(motivnr, katnr, start, ax_showcontent_cb );
ax_showbottomnav( 'motiveliste_'+katnr+'_'+start );
}
function ax_getmotivside_cb(new_data) {
document.getElementById("menu_m_over").innerHTML='
';
showdiv("menu_m_over");
}
function ax_selectmotiv(motivnr) {
x_ax_selectmotiv(motivnr, ax_showcontent_cb );
x_ax_getmotivside(motivnr,ax_getmotivside_cb);
}
function ax_selectmotivandcheck_cb(new_data) {
ax_showcontent('pruefen');
}
function ax_selectmotivandcheck(motivnr) {
x_ax_selectmotiv(motivnr, ax_selectmotivandcheck_cb );
x_ax_getmotivside(motivnr,ax_getmotivside_cb);
}
function ax_vipcode_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
if(new_data!="") {
document.getElementById("vipcode1").disabled=true;
document.getElementById("vipcode2").disabled=true;
document.getElementById("vipcode3").disabled=true;
document.getElementById("vipok").style.display="inline";
}
}
function vipkeypressed(feld1, feld2) {
if(document.getElementById("vipcode"+feld1).value.length==4) eval("document.formular.vipcode"+feld2+".focus();");
}
function ax_vipcode() {
completecode=document.getElementById("vipcode1").value+document.getElementById("vipcode2").value+document.getElementById("vipcode3").value;
if(completecode.length==12)
x_ax_vipcode(document.getElementById("vipcode1").value+document.getElementById("vipcode2").value+document.getElementById("vipcode3").value, ax_vipcode_cb);
}
function ax_gscode_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
if(new_data!="") {
document.getElementById("gscode1").disabled=true;
document.getElementById("gscode2").disabled=true;
document.getElementById("gscode3").disabled=true;
document.getElementById("gsok").style.display="inline";
help=new_data.split("|");
document.getElementById("gswert").innerHTML=help[0];
document.getElementById("gsumme").innerHTML=help[1];
}
}
function gskeypressed(feld1, feld2) {
if(document.getElementById("gscode"+feld1).value.length==4) eval("document.formular.gscode"+feld2+".focus();");
}
function ax_gscode() {
completecode=document.getElementById("gscode1").value+document.getElementById("gscode2").value+document.getElementById("gscode3").value;
if(completecode.length==12)
x_ax_gscode(document.getElementById("gscode1").value+document.getElementById("gscode2").value+document.getElementById("gscode3").value, ax_gscode_cb);
}
function ax_faq() {
x_ax_faq(document.getElementById("frm_frage").value, ax_showcontent_cb);
}
function ax_order_cb(new_data) {
new_data=new_data.replace(/\r\n/g,"");
help=new_data.split("|");
if(help[0]=="ok") {
ax_showcontent_cb(help[1]);
hidediv("menu_g_over"); hidediv("menu_m_over");
} else {
help[0]=help[0].replace(/\r\n/g,"");
if(help[0]=="nopaypal") {
showdiv("fehlermsgbox");
showdiv("fehlermsg");
}
if(help[0]=="gotopaypal") {
location.replace(help[1]);
}
if(help[0]=="notok") {
//show error
showdiv("fehlermsgbox3");
for(i=0;i