//  added from toolkitvalidatelicense.jsp for toolkit purpose 
var version = deconcept.SWFObjectUtil.getPlayerVersion();
if (document.getElementById && (version['major'] < 8)) {
	var x = confirm("izmoToolkit needs Flash 8.0 player. \nDownload now?");
	if (x == true)	{
		//document.location.href = "http://www.macromedia.com/go/getflash/";
		window.open("http://www.macromedia.com/go/getflash/");
	}
}

/* Function for return XMLName to Flash on Form submit */

function callFromFlash(me){
	var xmlValue = parent.document.getElementById('xmlFileName').value;	
	return trim(xmlValue, "");
}

function trim(str, chars) {
    return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
    chars = chars || "\\s";
    return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

// End of function  //

function flash360Interior(url)
{
	var offLft = document.getElementById("toolMaindiv").offsetLeft;
	var offRt = document.getElementById("toolMaindiv").offsetTop;
	document.getElementById('toolkit360').style.display = 'block';
	document.getElementById('toolkit360').innerHTML = "<iframe src="+url+" frameborder='0' height='350' width='500' scrolling='no' ></iframe>";
	document.getElementById('toolkit360').style.left =(offLft+192)+"px";
	document.getElementById('toolkit360').style.top =(offRt+52)+"px";
	
}
function close360Interior()
{
	document.getElementById('toolkit360').style.display = 'none';
}
function jsGetAllYear() {
	setTimeout("jsGetAllYear_ad()",9000);
}

function jsGetAllYear_ad() {
        var newArr = yearArraynew;

        jsFillYear(newArr);
}

function thisMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;

	return (isIE) ? window[movieName] : document[movieName];
}

function jsFillYear(str) {
	//alert(str);
	thisMovie("extint").asFillYear("Select Year|2006|2007");

	thisMovie("extint").asFillMake(yearmakeArray[0]);
	thisMovie("extint").asFillModel(yearmodelArray[0][0]);

	thisMovie("extint").asFillTrim(yeartrimArray[0][0][0]);
	//alert(str);
}

function jsFillMake(str) {
	thisMovie("extint").asFillMake(str);

}	
function jsFillModel(str) {

	thisMovie("extint").asFillModel(str);
}		

function jsFillTrim(str) {
	thisMovie("extint").asFillTrim(str);

}		

// This function "jsFunc" will be called from ActionScript
function jsGetAllMake(str) {

	jsFillMake(yearmakeArray[str]);
}

function jsGetAllModel(yearIndex,makeIndex) {
	jsFillModel(yearmodelArray[yearIndex][makeIndex]);

}	
function jsGetAllTrim(yearIndex,makeIndex,modelIndex) {

	jsFillTrim(yeartrimArray[yearIndex][makeIndex][modelIndex]);
}	
// end of copying from toolkitvalidatelicense.jsp -->
