function preload(css){
	 var fileref=document.createElement("link");
	 fileref.setAttribute("href", "css/"+css+".css");
}

function loadcss(css){
  var fileref=document.createElement("link");
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", "css/"+css+".css")
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
  document.cookie = 'cssStyle='+css+';';
  if(css=="index1" && document.getElementById("iframer")!=null){
	  document.getElementById("iframer").style.height="234px";
  }else if(css=="index2" && document.getElementById("iframer")!=null){
	  document.getElementById("iframer").style.height="319px";
  }else if(css=="index3" && document.getElementById("iframer")!=null){
	  document.getElementById("iframer").style.height="394px";
  }
}
preload("index1");
preload("index2");
preload("index3");

var nameEQ = "cssStyle=";
var ca = document.cookie.split(';');

function doSearch(){
	for(var i=0;i < ca.length;i++) {
	var c = ca[i];
	while (c.charAt(0)==' ') c = c.substring(1,c.length);
	if (c.indexOf(nameEQ) == 0) {
		if(c.substring(nameEQ.length,c.length)!="index1"){
			loadcss(c.substring(nameEQ.length,c.length));
		}
	}
	
}
}

doSearch();
function disclaimer()
{
	newwindow=window.open('disclaimer.html','dislaimer','height=200,width=920');
	if (window.focus) {newwindow.focus()}
}

