function open_window(uRL) {
	var window_height = 50, window_width = 300;
	var win = window.open(uRL, "window","toolbar=no, width="+window_width+", height="+window_height+" ,status=no, scrollbars=no, resizable=no, menubar=no");
}

function ld(theurl) {
	document.getElementById("url").href = theurl;
	document.getElementById("url").click();
}

function popUp(URL, title, width, height, resizable, scrollbars){
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=" + resizable + ",width=" + width + ",height=" + height + ",left = 100,top = 100');");
}

	   		function showBuildYourOwnLap() 
			{
				//tb_show("", "http://hyundai.realitydigital.net/default.aspx?KeepThis=true&TB_iframe=true&height=552&width=1000&modal=false");
				//tb_show("", "http://stage.edityourown.com/editYourOwn.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=552&width=1000&modal=false");
				//tb_show("", "http://stage.edityourown.com/iframe_coupe01.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=502&width=1000&modal=false");
				  tb_show("", "http://www.edityourown.com/iframe_coupe01.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=502&width=1000&modal=false");


			}
			function showVideo(videoID)
			{
                tb_show("", videoID + "?KeepThis=true&amp;TB_iframe=true&height=552&amp;width=1000&transparency=false&modal=true");
            }
			
			function closeFrame()
			{
				//alert("closeFrame_handler");
				tb_remove();
				//top.tb_remove();
			}
			
/*
if (screen.availHeight > 800){
	hght="100%";
	wdt="100%";
}
else{

	hght="700";
	wdt="100%";
}	
*/

function getPageHeight(){
		pageHeight = document.getElementById('theDoc').offsetHeight;
		//alert("the page is " + pageHeight + " pixels high");
	}



hght="100%";
wdt="100%";

//if (screen.availHeight <= 605){
	if (screen.availHeight <= 768){
	hght = 650;
}
//
if (screen.availWidth <= 1000){
	wdt = 1000;
}	

//getPageHeight();
//getHeight();

//alert("screen.availHeight: " + screen.availHeight +" screen.availWidth: "+screen.availWidth);
//alert("hght: " + hght +" wdt: "+wdt);

function detectBrw(srcs,hght,wdt){
			
//alert (srcs + ' ' + ' ' + hght + 'x' + wdt);
var todo=BrowserDetect.browser;
switch(todo)
{
case 'Explorer':
//alert("entra explorer");
if ( BrowserDetect.version <= 6){
//alert("entra explorer");
ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, wmode:'opaque',  height: hght,  flashvars:'openURL='+srcs,  quality: 'high',  bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});
//alert (BrowserDetect.browser + ' ' + BrowserDetect.version + ' NO iframe ' );
}
else {

ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, height: hght,  flashvars:'openURL='+srcs,  quality: 'high', 	 bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});
//alert ("SI Iframe");
}
  break;    
case 'Firefox':
if ( BrowserDetect.version <= 2){
//alert (BrowserDetect.browser + ' ' + BrowserDetect.version + ' NO iframe ' );
ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, wmode:'opaque',  height: hght,  flashvars:'openURL='+srcs,  quality: 'high',  bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});

}
else {
//alert ("SI Iframe");
ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, height: hght,  flashvars:'openURL='+srcs,  quality: 'high', 	 bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});

}
  break;
 case 'Safari':
//alert (BrowserDetect.browser + ' ' + BrowserDetect.version + ' NO iframe '  );
ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, wmode:'opaque', height: hght,  flashvars:'openURL='+srcs,  quality: 'high',  bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});
  break;
  
  default:
  
//alert ("SI iframe");
ids.flash.add('wrapper', { movie: 'preloader.swf',  id: 'wrapper',  width: wdt, height: hght,  flashvars:'openURL='+srcs,  quality: 'high', 	 bgcolor: '#000000',  version: '9',  allowFullScreen: 'true',  allowScriptAccess:'sameDomain'});

}
}
