// ### Version 29.01.2004 18:50 ## fk ###
// ###############################   SF INTERNET EXOPLORERR SCROLL HANDLING #################################

var gBrowserName = navigator.appName;
var gAppversion = navigator.appVersion;

//alert("DOM: " + DOM + "  DHTML: " + DHTML + "  OP: " + OP + " gBrowserName: " + gBrowserName + "  gAppversion: " + gAppversion);


if (navigator.appName == "Microsoft Internet Explorer"){
	document.writeln('<style type="text/css">'); 
	document.writeln('body {color:#000000; background-color: #FFFFFF; margin:0px; padding:0px; font-size:11px; font-family:verdana, arial, helvetica, sans-serif; overflow: auto;}');
	document.writeln('</style>');
}


/*************************************************************************
 * // function:      switchCountry()
 * // return type:   string
 * // version: 1.0
 * // date: 29/01/2004, ID: fk SiteForce
 *************************************************************************/
function switchCountry(mLocaleString) {

	var mReloadURL = "index.jsp?action=setValues&locale=" + mLocaleString;
	top.location.href = mReloadURL;
	
}

function loadPageInLocale(pagecode, mLocaleString) {
    if (mLocaleString == null)
        mLocaleString = "de_DE";
    var mReloadURL = "index.jsp?specialContent=/aslcms/cms/frontend/asl/standard.jsp&action=displayPage&pagecode=" + pagecode + "&locale=" + mLocaleString;
    setCountryCookie(mLocaleString);
    //var mReloadURL = "standard.jsp?action=displayPage&pagecode=" + pagecode + "&locale=" + mLocaleString;
    top.location.href = mReloadURL;
}


/*************************************************************************
 * // function:      ShowObjectProperties()
 * // return type:   string
 * // version: 1.1
 * // date: 31/01/2004, ID: fk SiteForce
 *************************************************************************/
function ShowObjectProperties(mObject) {
	var mWindow = window.open("", "DEBUG", "toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=1,resizable=1,width=500,height=600");
	mWindow.document.open();
	
	for (var i in mObject) {
		mWindow.document.write('<BR><B>' + i + '</B> = ' + mObject[i] );
	}
	
	mWindow.document.close();
    mWindow.focus();
}



/*************************************************************************
 * // function:      checkFrameset()
 * // return type:   string
 * // version: 1.1
 * // date: 31/01/2004, ID: fk SiteForce
 *************************************************************************/
function checkFrameset(mRedirectFramesetURL){

	var mFrameCount = parent.frames.length;
	
	// ########## Update Menu Navigation ########	
	if(mFrameCount > 0){
		var mSelfURL = window.location.href;
		
                var mSelection = null;
                if (top.frames[1].FindSelectedMenuItem) {
                    mSelection = top.frames[1].FindSelectedMenuItem(mSelfURL);
                }
		//alert("FindSelectedMenuItem mSelection " + mSelection);
		if(mSelection != null){
			var mActualSelection = top.frames[1].gSelectedMENUItem;
			if(mActualSelection != mSelection){
				top.frames[1].UPDATEMENU(mSelection,true); // ### Here we Update the Navigation
			}
		}
			
	}
	// ##########################################
	
	
	// ########## Depplink Load Frameset if not existing ########	
	if(mFrameCount == 0){
		if (mRedirectFramesetURL == null){ var mRedirectFramesetURL = "index.jsp";} // ### Default redirection frameset URL 
		
		var mQueryStartPos = mRedirectFramesetURL.lastIndexOf("?");
		
		var mSelfURL = window.location.href;
		
		if(mSelfURL.lastIndexOf("action=previewCmsContent") == -1 && mSelfURL.lastIndexOf("action=previewCurrentContent") == -1 ){ // ### Dont allow redirection for previewCmsContent actions
			
			var mSelfURL = mSelfURL.replace(/\?/,"&");

			if(mQueryStartPos > -1){
				var mRedirectionURL =  mRedirectFramesetURL + "&specialContent=" + mSelfURL;
			} else {
				var mRedirectionURL =  mRedirectFramesetURL + "?specialContent=" + mSelfURL;
			}
		
			//alert( "mRedirectionURL: " + mRedirectionURL);
			
			// ### call redirection ###
			document.location.href = mRedirectionURL;
		}
	
	}
}


// ###############################   SF COOKIE HANDLING AREA START #################################


/*************************************************************************
 * // function:      getCountryCookie()
 * // return type:   string
 * // version: 1.0
 * // date: 04/12/2003, ID: fk SiteForce
 *************************************************************************/
function getCountryCookie(){	

	var mLocale = null; 
	
	// #### Check Cookies Enabled ####
 	if (navigator.cookieEnabled == false) {
 	 	//document.location.href= mLoginURL;
 		alert('ACHTUNG: Cookies sind nicht aktiviert.\nDieser Web Service verwendet Cookies.\nBitte aktivieren Sie Cookies in Ihrer Internet Browser Konfiguration!');	
 		return;
 	}
	
	var mCookieStr = document.cookie;	
	if( mCookieStr != "") { 
		mLocale = getCookieData("country_id");
	}
	return mLocale;
}


/*************************************************************************
 * // function:      setCountryCookie()
 * // return type:   null
 * // version: 1.0
 * // date: 04/12/2003, ID: fk SiteForce
 *************************************************************************/
function setCountryCookie(country_id){	
	
	var mDefaultCountryID = "de_DE"; 
	var mExpiresSeconds = 60 * 60 * 24 * 365;
	
	// #### Check Cookies Enabled ####
 	if(navigator.cookieEnabled == false) {
 	 	//document.location.href= mLoginURL;
 		alert('ACHTUNG: Cookies sind nicht aktiviert.\nDieser Web Service verwendet Cookies.\nBitte aktivieren Sie Cookies in Ihrer Internet Browser Konfiguration!');	
 		return;
 	}
	
	if(country_id == null) {
            country_id = mDefaultCountryID;
        }
	var mAttribut = "country_id";
	var mValueString = country_id;
	
	setCookie(mAttribut,mValueString,mExpiresSeconds);
}




/*************************************************************************
 * // function:      setCookie()
 * // return type:   string
 * // version: 1.0
 * // date: 25/11/2003, ID: fk SiteForce
 *************************************************************************/
function setCookie(mAttribut,mValueString,mExpiresSeconds){	

	var mDefaultExpirationSeconds = 20;
	
	if(mExpiresSeconds == null){
		mExpiresSeconds = mDefaultExpirationSeconds;
	}
	
	// #### CALCULATE EXPIRATION DATE FOR COOKIE ####
	var mExpirationDate = new Date();
	var mExpirationTimeValue = mExpirationDate.getTime() + (mExpiresSeconds * 1000);
	mExpirationDate.setTime(mExpirationTimeValue);
	var mExpirationTimeString = mExpirationDate.toGMTString()
	
	var mCookieString = mAttribut + "=" + mValueString + ";expires=" + mExpirationTimeString + ";dummy=hellodummyvalue";
	
    document.cookie = mCookieString;// ### write cookie string

	
}


/*************************************************************************
 * // function:      setSessionCookie()
 * // return type:   null
 * // version: 1.0
 * // date: 25/11/2003, ID: fk SiteForce
 *************************************************************************/
function setSessionCookie(){	

	var mSessionExpiresSeconds = 20;

	
	// #### CALCULATE EXPIRATION DATE FOR COOKIE ####
	var mExpirationDate = new Date();
	var mExpirationTimeValue = mExpirationDate.getTime() + (mSessionExpiresSeconds * 1000);
	mExpirationDate.setTime(mExpirationTimeValue);
	var mExpirationTimeString = mExpirationDate.toGMTString()
	
	var mCookieString = "session=" + mExpirationTimeValue + ";expires=" + mExpirationTimeString;
	
    document.cookie = mCookieString;// ### write cookie string

	
}


/*************************************************************************
 * // function:      getCookieData()
 * // return type:   string
 * // version: 1.0
 * // date: 25/11/2003, ID: fk SiteForce
 *************************************************************************/
function getCookieData(mGetAttribute){	
	
	// #### CALCULATE EXPIRATION DATE FOR COOKIE ####
	var mActualDate = new Date();
	var mActualDateTimeValue = mActualDate.getTime();
	
	 var mCookieData = document.cookie;// ### get cookie string
	 
	if(mGetAttribute == null){
		return mCookieData;
	}
	

	var mCookieArray = mCookieData.split(";");
	
	for(var i = 0; i < mCookieArray.length; i++){
		var mCookiePair = mCookieArray[i];
		
		var mPairArray = mCookiePair.split("=");
		var mAttribute = mPairArray[0];
		var mValue = mPairArray[1];
		
		//alert("mAttribute:" + mAttribute + " mValue:" + mValue);
		
		if (mAttribute.indexOf(mGetAttribute) != -1){
			return mValue;
		}
	}
	
	
}




// ###############################   SF COOKIE HANDLING AREA END #################################





// ##########   ASL JAVASCRIPT LIB ##########


var gBANNER = new Array(); // ## Banner OBJECTBASE
var gBANNER_counter = 0;  // ## Counter der Banner Elemente
var gBANNER_ANIM_STEP = 0;  // ## STEP COUNTER for Banner Animation

var gSelectedBANNERItem = 0;
var gAnimationDuration = 4000;
var gActualTimeout = 0;
var gAnimationFlag = true; // gAnimationFlag controll flag


//##############   GetgMENUData   ###############
function GetgMENUData(){
	return parent.frames[1].gMENU;
 	
}


//##############   LoadURL   ###############
function LoadURL(mURL){
	//alert("LoadURL: " + mURL);
	top.frames[1].LoadContentURL(mURL);

}


// ###############   BANNERObject    ###############
function BANNERObject(ID,title,subtitle,duration,type,style, media_url,link_url,link_popup) {

	var mDefaultDuration = gAnimationDuration; // Milliseconds default duration
	var mDefaultType = "n"; //  default type of banner
	var mDefaultStyle = "bannerTable"; //  default type of banner
	
	this.id = ID; // ## ID of Banner Object
	
	this.title = title; // ## title to display
	this.subtitle = subtitle; // ## subtitle to display
	
	// ### Fill duartion value ###
	if(duration == null || duration<1){
		this.duration = mDefaultDuration; // ## default duration
	} else {
		this.duration = duration; // ## duration to display banner
	}
	
	// ### Fill duartion value ###
	if(type != null){
		this.type = type; // ## type to display banner n=normal and others...
	} else {
		this.type = mDefaultType; // ## default type
	}
	
	this.media_url = media_url; // ## url of media
	this.link_url = link_url; // ## hyperlink url
	this.link_popup = link_popup; // ## hyperlink as popup
	this.selected = false; // ## selected flag
	
	// ### Fill style value ###
	if(style != null){
		this.style = style;
	}else {
		this.style = mDefaultStyle; // deafult style sheet class
	}

    this.item = gBANNER_counter; // ## item counter
        
	gBANNER[gBANNER_counter] = this; // ## gBANNER Database
	gBANNER_counter ++;  // ## Counter der Elemente

	return this;
}


//##############   BannerAnimation   ###############
function BannerAnimation(){
	var mMaxItems = gBANNER.length;
	
	if(gAnimationFlag == false){
		window.clearTimeout(gActualTimeout);
		return;
	}
	
	gBANNER_ANIM_STEP ++;
	if(gBANNER_ANIM_STEP >= mMaxItems){gBANNER_ANIM_STEP = 0;}
	
	UPDATEBANNER();
	window.clearTimeout(gActualTimeout);
        //BannerAnimation();
 	gActualTimeout = window.setTimeout("BannerAnimation()",gAnimationDuration);
 	
}

//##############   UPDATEBANNER   ###############
function UPDATEBANNER(){
	var mMaxItems = gBANNER.length;

	var mBANNERObject = gBANNER[gBANNER_ANIM_STEP];
	
	var mMedia = mBANNERObject.media_url;
	var mLink = mBANNERObject.link_url;
	var mTitle = mBANNERObject.title;
	var mSubTitle = mBANNERObject.subtitle;
	
		
	mBannerMedia = new Image(); 
	mBannerMedia.src = mMedia ; 
	
    gAnimationDuration = mBANNERObject.duration; // ## Update global Duration value
    
    eval ('document.images.banner_image.src = "' + mBannerMedia.src + '";');	

    if(mMedia==null ||mMedia=="")
        eval ('document.images.banner_image.style.display = "none";');	
    else
        eval ('document.images.banner_image.style.display = "block";');	
    
    for(var i = 0; i < mMaxItems; i++){
    	var mStepBtnName = "banner_step_btn_" + i;
    	
    	if(i == gBANNER_ANIM_STEP){
			var mImagePath = "images/stepstatus_1.gif";
		} else {
			var mImagePath = "images/stepstatus_0.gif";
		}
    	
    	eval ('document.images.' + mStepBtnName + '.src = "' + mImagePath + '";');	
    }
    
    
    if(DHTML) {
		if(NS) {
			setCont("id","bannerTitle",null,"<span class=\"BannerTitleDiv\">" + mTitle + "<\/span>");
			setCont("id","bannerSubTitle",null,"<span class=\"BannerSubTitleDiv\">" + mSubTitle + "<\/span>");
			
		} else {  
			setCont("id","bannerTitle",null,mTitle);
			setCont("id","bannerSubTitle",null,mSubTitle);
		}
	}
	
 	
}


//##############   ShowBannerStep   ###############
function ShowBannerStep(mNum){

	//gAnimationFlag = false; // switch off animation
	//window.clearTimeout(gActualTimeout); // reset timeout
	
	gBANNER_ANIM_STEP = mNum;
	
	UPDATEBANNER();
	
	window.clearTimeout(gActualTimeout);
 	gActualTimeout = window.setTimeout("BannerAnimation()",gAnimationDuration);
}


//##############   SelectActualBanner   ###############
function SelectActualBanner(){
	gAnimationFlag = false; // switch off animation
	window.clearTimeout(gActualTimeout); // reset timeout
	
	// ### Get actual Banner Object data ###
	var mBANNERObject = gBANNER[gBANNER_ANIM_STEP];
	
	var mTitle = mBANNERObject.title;
	var mLink = mBANNERObject.link_url;
	var openInPopup = mBANNERObject.link_popup;
	//alert("BANNER CLICK " + mTitle + "  mLink:" + mLink);
	
	//parent.frames[1].LoadContentURL(mLink);

        if(openInPopup)
            popUp(mLink,'navigationpopup',400,500);
        else
            location.href=mLink;
}



//##############   FILL_BANNER_HTML   ###############

function FILL_BANNER_HTML(mBannerID){

// ### Get actual Banner Object data ###
var mBANNERObject = gBANNER[gBANNER_ANIM_STEP];
var mMaxItems = gBANNER.length;
	
var mTitle = mBANNERObject.title;
var mSubTitle = mBANNERObject.subtitle;

var mLink = mBANNERObject.link_url;
var mMedia = mBANNERObject.media_url;	
	
var mHTML = "";
document.writeln('<!-- #################### ASL ANIMATED BANNER ################### //-->');
document.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="bannerTable">');
document.writeln('<TR><TD CLASS="bannerTableTD">');
document.writeln('<A HREF="javascript:SelectActualBanner()"><img name="banner_image" src="' + mMedia + '" alt="" VPSACE="0" HSPACE="0" ALIGN="CENTER" border="0"></A>');
document.writeln('</TD></TR>');
document.writeln('<TR><TD CLASS="bannerTableTD">');
document.write('<div id="bannerTitle">');
document.write(mTitle);
document.writeln('</div>');
document.writeln('</TD></TR>');
document.writeln('<TR><TD ALIGN="CENTER" CLASS="bannerStatus">');
document.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');
document.writeln('<TR>');

for(var i = 0; i < mMaxItems; i++){
	
	if(i == gBANNER_ANIM_STEP){
		var mImagePath = "images/stepstatus_1.gif";
	} else {
		var mImagePath = "images/stepstatus_0.gif";
	}
	
	document.writeln('<TD ><A HREF="javascript:ShowBannerStep(' + i + ')"><img name="banner_step_btn_' + i + '" src="' + mImagePath + '" alt="" VPSACE="0" HSPACE="0" border="0"></A></TD>');
}

//document.writeln('<TD CLASS="banner_footer"><A CLASS="bannerLink" HREF="javascript:ShowBannerStep(1)">#</A>1 von '+ mMaxItems + '<A CLASS="bannerLink" HREF="javascript:ShowBannerStep(1)">#</A></TD>');
document.writeln('</TR>');
document.writeln('</TABLE>');
document.writeln('</TD></TR>');
document.writeln('</TABLE>');

}


// ##########   GLOBALE Date Variable ##########

var mWindow = null;

var gJetztDate  = new Date();
var gJetztYear = gJetztDate.getYear();
var gJetztMonth = gJetztDate.getMonth();
var gJetztDay = gJetztDate.getDate();

var gJetztTime = gJetztDate.getTime();
var gJetztHour = gJetztDate.getHours();



// ###############   EventObject    ###############
function GetActualDateString(){

	var mJetztMonth = (gJetztMonth + 1);
	var mResult = "" + gJetztDay + "." + mJetztMonth + "." + gJetztYear;
	
	document.writeln(mResult);
	
}


// ### ShowObjectProperties  ###
function ShowObjectProperties(mObject) {
	var mWindow = window.open("", "DEBUG", "toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=1,resizable=1,width=500,height=600");
	mWindow.document.open();
	
	for (var i in mObject) {
		mWindow.document.write('<BR><B>' + i + '</B> = ' + mObject[i] );
	}
	
	mWindow.document.close();
    mWindow.focus();
}



/****************************************************************
 * // function:      ShowSitemap()
 * // return type:   null
 * // version: 1.0
 * // date: 24/11/2003, ID: fk
 ********************** ShowSitemap  *****************************************/
function ShowSitemap() {

	mBaseURL = ""; //.top.frames["top"].gBaseURL;
	

	var mURL = mBaseURL + "sitemap/index.htm";
	var wndname = "ASL_SITEMAP";
	var width = 370;
	var height = 600;
	
	var xPos = (screen.width - width - 30);
	var yPos = 10;
	popUp(mURL,wndname,width,height,xPos,yPos);
   
    
}


/****************************************************************
 * // function:      FWC_Login()
 * // return type:   null
 * // version: 1.0
 * // date: 24/11/2003, ID: fk
 ********************** SelectMapItem  *****************************************/
function FWC_Login() {

	mBaseURL = "";
	
	var mURL = mBaseURL + "fwc_login/index.htm";
	var wndname = "FWC_LOGIN";
	var width = "400";
	var height = "500";

    
	popUp(mURL,wndname,width,height);
   
    
}


/****************************************************************
 * // function:      Liefertermin_Login()
 * // return type:   null
 * // version: 1.0
 * // date: 24/11/2003, ID: fk
 ********************** SelectMapItem  *****************************************/
function Liefertermin_Login() {

	mBaseURL = top.frames["top"].gBaseURL;
	
	var mURL = mBaseURL + "liefertermin_login/index.htm";
	var wndname = "LIEFERTERMIN_LOGIN";
	var width = "400";
	var height = "500";
	
	popUp(mURL,wndname,width,height);
   
    
}




/****************************************************************
 * // function:      popUpFrameset(mID)
 * // return type:   null
 * // version: 1.0
 * // date: 30/04/2003, ID: fk
 ***************************************************************/
function popUpFrameset(URL,wndname,width,height,runningLocaleCountry,xPos,yPos) {

    var JavaVersion = 11;
    if(navigator.appVersion.substring(0,1) >= 4)  {var JavaVersion = 12;}
    
    
    // ### Sizecontrol for Popup RECHTLICHE HINWEISE  ###
    if (wndname.indexOf("RECHT") != -1){
		width = 600;
		height = 450;
	}
	
	// ### Sizecontrol for Popup IMPRESS HINWEISE  ###
    if (wndname.indexOf("IMPRESS") != -1){
		width = 350;
		height = 550;
	}
	
	// ### Sizecontrol for Popup IMPRESS HINWEISE  ###
    if (wndname.indexOf("SITEMAP") != -1){
		width = 340;
		height = 700;
	}
		

    if (width != null){
    	var mWidth = width;
    } else {
    	var mWidth = 600;
    }
    
    if (height != null){
    	var mHeight = height;
    } else {
    	var mHeight = 500;
    }
    
    if (URL != null){
		var mURL= URL ;
	}else {
		var mURL= "#" ;
	}
    
    if (wndname != null){
		var mWindowName= wndname ;
		var mWindowName = mWindowName.replace(/ /,"_");
	}else {
		var mWindowName= "POPUP" ;
	}
	
	
	
    mWindow = window.open("", mWindowName, "toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=0,resizable=1,width="+ mWidth + ",height="+ mHeight +"");
    
   // #### Wenn moderner Browser dann Fenster zentrieren ###
   	if (JavaVersion >= 12) {
		
		if (mWindowName.indexOf("SITE") != -1){
			var mXPos = ((screen.width -mWidth ) - 20);
			var mYPos = ((screen.height -mHeight) / 6);
   			mWindow.moveTo(mXPos,mYPos);
   		}
   	}
   	
    mWindow.document.open();
    
    mWindow.document.writeln('<HTML>');
	mWindow.document.writeln('<HEAD>');
	mWindow.document.writeln('<TITLE>' + mWindowName + '</TITLE>');
	mWindow.document.writeln('</HEAD>');
        mWindow.document.writeln('<SCRIPT language="JavaScript">');
        mWindow.document.writeln('function fetchUserdata(whichValue) {');
        mWindow.document.writeln('    if (eval(self.opener) && self.opener.top.fetchUserdata) ');
        mWindow.document.writeln('        return self.opener.top.fetchUserdata(whichValue);');
        mWindow.document.writeln('    return "";');
        mWindow.document.writeln('}');
        mWindow.document.writeln('</SCRIPT>');
	mWindow.document.writeln('<FRAMESET  ROWS="100,*,25" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">');
	mWindow.document.writeln('<FRAME SRC="empty.htm" NAME="popup_top" SCROLLING="NO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');
	mWindow.document.writeln('<FRAME SRC="' + mURL + '" NAME="popup_content"  SCROLLING="AUTO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');		
	mWindow.document.writeln('<FRAME SRC="empty.htm" NAME="popup_bottom"  SCROLLING="NO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');
	mWindow.document.writeln('</FRAMESET>');

	mWindow.document.writeln('</HTML>');

     
	mWindow.document.close();

	// ###### POPUP TOP WINDOW LOGO #####
	topWnd = mWindow.frames[0].document;
	topWnd.close();
 	topWnd.open("text/html","replace");
 	topWnd.writeln('<HTML>');
 	topWnd.writeln('<HEAD>');
 	topWnd.write('</HEAD>');
	topWnd.writeln('<style type="text/css">');
 	topWnd.writeln('BODY { background-color:#FFFFFF; margin-left:0px; margin-top:0px; margin-right:0px; scroll:no; overflow: auto; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	topWnd.writeln('TD {margin:0px; padding:0px; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	topWnd.writeln('.LOGO { position:absolute; top:0px; left:0px; z-index:0; padding:0px; visibility:visible; margin:0px; }');
	topWnd.writeln('</style>');

	topWnd.writeln('<BODY marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">');
	topWnd.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%">');
	topWnd.writeln('<TR>');
        if (runningLocaleCountry == "CH") {
            topWnd.writeln('<TD><IMG SRC="images/ge_logo_big.gif" ALT="GE - Logo" VSPACE="0" HSPACE="0" BORDER="0"></TD>');
        } else {
            topWnd.writeln('<TD><IMG SRC="images/asl_logo_big.gif" ALT="ASL Auto Service Leasing - Logo" VSPACE="0" HSPACE="0" BORDER="0"></TD>');
        }
	topWnd.writeln('</TD>');
	topWnd.writeln('</TR>');
	topWnd.writeln('</TABLE>');
	topWnd.writeln('</BODY>');
	topWnd.writeln('</HTML>');
	topWnd.close();

	// ###### POPUP TOP WINDOW LOGO #####
	botWnd = mWindow.frames[2].document;
	botWnd.close();
 	botWnd.open("text/html","replace");
 	botWnd.writeln('<HTML>');
 	botWnd.writeln('<HEAD>');
 	botWnd.write('</HEAD>');
 	
	botWnd.writeln('<style type="text/css">');
 	botWnd.writeln('BODY { background-color:#CCDDEF; margin-left:0px; margin-top:0px; margin-right:0px; scroll:no; overflow: auto; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	botWnd.writeln('TD {margin:0px; padding:5px; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px;}');
	botWnd.writeln('a.navigation:link 	{ color:#666666; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:visited{ color:#666666; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:hover  { color:#3b73b9; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration: underline; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:active { color:#3b73b9; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
	botWnd.writeln('</style>');

	botWnd.writeln('<BODY marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">');
	botWnd.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="95%">');
	botWnd.writeln('<TR>');
 	botWnd.writeln('<TD ALIGN="right"><A href="javascript:parent.self.close()" CLASS="navigation">[ FENSTER SCHLIESSEN</A>&nbsp;</TD>');
	botWnd.writeln('</TR>');
	botWnd.writeln('</TABLE>');
	botWnd.writeln('</BODY>');
	botWnd.writeln('</HTML>');
	botWnd.close();


   	
    mWindow.focus();
   
    
}

/****************************************************************
 * // function:      popUpFrameset(mID)
 * // return type:   null
 * // version: 1.0
 * // date: 30/04/2003, ID: fk
 ***************************************************************/
function popUpAutoKomfortFrameset(URL,wndname,width,height,xPos,yPos) {

	
    var JavaVersion = 11;
    if(navigator.appVersion.substring(0,1) >= 4)  {var JavaVersion = 12;}
    
    
    // ### Sizecontrol for Popup RECHTLICHE HINWEISE  ###
    if (wndname.indexOf("RECHT") != -1){
		width = 600;
		height = 450;
	}
	
	// ### Sizecontrol for Popup IMPRESS HINWEISE  ###
    if (wndname.indexOf("IMPRESS") != -1){
		width = 350;
		height = 550;
	}
	
	// ### Sizecontrol for Popup IMPRESS HINWEISE  ###
    if (wndname.indexOf("SITEMAP") != -1){
		width = 340;
		height = 700;
	}
		

    if (width != null){
    	var mWidth = width;
    } else {
    	var mWidth = 600;
    }
    
    if (height != null){
    	var mHeight = height;
    } else {
    	var mHeight = 500;
    }
    
    if (URL != null){
		var mURL= URL ;
	}else {
		var mURL= "#" ;
	}
    
    if (wndname != null){
		var mWindowName= wndname ;
		var mWindowName = mWindowName.replace(/ /,"_");
	}else {
		var mWindowName= "POPUP" ;
	}
	
	
	
    mWindow = window.open("", mWindowName, "toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=0,resizable=1,width="+ mWidth + ",height="+ mHeight +"");
    
   // #### Wenn moderner Browser dann Fenster zentrieren ###
   	if (JavaVersion >= 12) {
		
		if (mWindowName.indexOf("SITE") != -1){
			var mXPos = ((screen.width -mWidth ) - 20);
			var mYPos = ((screen.height -mHeight) / 6);
   			mWindow.moveTo(mXPos,mYPos);
   		}
   	}
   	
    mWindow.document.open();
    
    mWindow.document.writeln('<HTML>');
	mWindow.document.writeln('<HEAD>');
	mWindow.document.writeln('<TITLE>' + mWindowName + '</TITLE>');
	mWindow.document.writeln('</HEAD>');
        mWindow.document.writeln('<SCRIPT language="JavaScript">');
        mWindow.document.writeln('function fetchUserdata(whichValue) {');
        mWindow.document.writeln('    if (eval(self.opener) && self.opener.top.fetchUserdata) ');
        mWindow.document.writeln('        return self.opener.top.fetchUserdata(whichValue);');
        mWindow.document.writeln('    return "";');
        mWindow.document.writeln('}');
        mWindow.document.writeln('</SCRIPT>');
	mWindow.document.writeln('<FRAMESET  ROWS="80,*,25" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0">');
	mWindow.document.writeln('<FRAME SRC="empty.htm" NAME="popup_top" SCROLLING="NO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');
	mWindow.document.writeln('<FRAME SRC="' + mURL + '" NAME="popup_content"  SCROLLING="AUTO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');		
	mWindow.document.writeln('<FRAME SRC="empty.htm" NAME="popup_bottom"  SCROLLING="NO" NORESIZE FRAMEBORDER="0" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMESPACING="0">');
	mWindow.document.writeln('</FRAMESET>');

	mWindow.document.writeln('</HTML>');

     
	mWindow.document.close();

	// ###### POPUP TOP WINDOW LOGO #####
	topWnd = mWindow.frames[0].document;
	topWnd.close();
 	topWnd.open("text/html","replace");
 	topWnd.writeln('<HTML>');
 	topWnd.writeln('<HEAD>');
 	topWnd.write('</HEAD>');
	topWnd.writeln('<style type="text/css">');
 	topWnd.writeln('BODY { background-color:#FFFFFF; margin-left:0px; margin-top:0px; margin-right:0px; scroll:no; overflow: auto; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	topWnd.writeln('TD {margin:0px; padding:0px; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	topWnd.writeln('.LOGO { position:absolute; top:0px; left:0px; z-index:0; padding:0px; visibility:visible; margin:0px; }');
	topWnd.writeln('</style>');

	topWnd.writeln('<BODY marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">');
	topWnd.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%">');
	topWnd.writeln('<TR>');
 	topWnd.writeln('<TD><IMG SRC="images/autokomfort_logo.gif" ALT="AutoKomfort - Ein Produkt der Disko und ASL" VSPACE="0" HSPACE="0" BORDER="0"></TD>');
	topWnd.writeln('</TD>');
	topWnd.writeln('</TR>');
	topWnd.writeln('</TABLE>');
	topWnd.writeln('</BODY>');
	topWnd.writeln('</HTML>');
	topWnd.close();

	// ###### POPUP TOP WINDOW LOGO #####
	botWnd = mWindow.frames[2].document;
	botWnd.close();
 	botWnd.open("text/html","replace");
 	botWnd.writeln('<HTML>');
 	botWnd.writeln('<HEAD>');
 	botWnd.write('</HEAD>');
 	
	botWnd.writeln('<style type="text/css">');
 	botWnd.writeln('BODY { background-color:#FFFFFF; margin-left:0px; margin-top:0px; margin-right:0px; scroll:no; overflow: auto; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:10px;}');
 	botWnd.writeln('TD {margin:0px; padding:5px; color:#666666; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px;}');
	botWnd.writeln('a.navigation:link 	{ color:#666666; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:visited{ color:#666666; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:hover  { color:#3b73b9; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration: underline; text-transform: uppercase;}');
 	botWnd.writeln('a.navigation:active { color:#3b73b9; background-color:#D0DDEE; font-family:Verdana,Arial,Helvetica,sans-serif; font-weight:normal; font-size:11px; text-decoration:none; text-transform: uppercase;}');
	botWnd.writeln('</style>');

	botWnd.writeln('<BODY marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">');
	botWnd.writeln('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="95%">');
	botWnd.writeln('<TR>');
 	botWnd.writeln('<TD ALIGN="right"><A href="javascript:parent.self.close()" CLASS="navigation">[ FENSTER SCHLIESSEN</A>&nbsp;</TD>');
	botWnd.writeln('</TR>');
	botWnd.writeln('</TABLE>');
	botWnd.writeln('</BODY>');
	botWnd.writeln('</HTML>');
	botWnd.close();


   	
    mWindow.focus();
   
    
}



/****************************************************************
 * // function:      popUp(mID)
 * // return type:   null
 * // version: 1.0
 * // date: 03/05/2002, ID: fk
 ********************** SelectMapItem  *****************************************/
function popUp(URL,wndname,width,height,xPos,yPos) {

    var JavaVersion = 11;
    if(navigator.appVersion.substring(0,1) >= 4)  {var JavaVersion = 12;}
    
    if (width != null){
    	var mWidth = width;
    } else {
    	var mWidth = 600;
    }
    
    if (height != null){
    	var mHeight = height;
    } else {
    	var mHeight = 500;
    }
    
    if (URL != null){
		var mURL= URL ;
	}else {
		var mURL= "#" ;
	}
    
    if (wndname != null){
		var mWindowName= wndname ;
	}else {
		var mWindowName= "POPUP" ;
	}
	
	
    mWindow = window.open(mURL, mWindowName, "toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=0,resizable=1,width="+ mWidth + ",height="+ mHeight +"");
    
    // #### Wenn moderner Browser dann Fenster zentrieren ###
   	if (JavaVersion >= 12) {
   	
		if (xPos != null){
			var mXPos = xPos;
		} else {
			var mXPos = ((screen.width -mWidth ) - 20) ;
		}
		
		if (yPos != null){
			var mYPos = yPos;
		} else {
			var mYPos = ((screen.height -mHeight) / 6) ;
		}

   		mWindow.moveTo(mXPos,mYPos);
   	}
   	
    mWindow.focus();
   
    
}



