// Authored by Paul Campbell released version 1 11/2003
//Functions included for rel4.2 to get and set the cookies on templateselect page
var cook = document.cookie;
var templateData;
function getCookie(name) { 
	var index = cook.indexOf(name + "=");
    if (index == -1) return null;
   	index = cook.indexOf("=", index) + 1;
    var endstr = cook.indexOf(";", index);
    if (endstr == -1) endstr = cook.length;
    return unescape(cook.substring(index, endstr));
}

var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);

function setCookie(name, value) {
   	if (value != null && value != ""){
      	document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
	}
	cook = document.cookie;
}

function defineCookie() {

loadDefault();
	
templateData = escape(name) + "^" + escape(tagline) + "^" + escape(street) + "^" + escape(city) + "^" + escape(state) + "^" + escape(zip) + "^" + escape(phone) + "^" + escape(fax) + "^" + escape(url) + "^" + escape(att1) + "^" + escape(att2) + "^" + escape(att3) + "^" +  escape(cfn) + "^" + escape(fl) + "^" + escape(cl) + "^" + escape(email) + "^" + escape(rad) + "^" + escape(pb) + "^" + escape(sr) + "^" + escape(sl) + "^" + escape(aop) + "^" + escape(ff) + "^" + escape(sl) + "^" + escape(tl) + "^" + escape(hl);

setCookie("templateData", templateData);
}

//Function added  for rel4.2 to load default values for cookie on templateselect page
function loadDefault(){
	
		name = "Smythe & Jones";
		tagline = "Serving the Metro Area since 1979";
        street = "127 Main Street";
		city = "Anytown"; 
		state = "Montana";
		zip = "02434";
		phone = "(123)456-7890";
		fax = "(123)456-7891";
		url = "http://www.smythejones.com";
		att1 = "Paul Smythe";
		att2 = "Ralph Jones";
		att3 = "Jay Duke";
	    cfn = "";
	fl = "bn";
		cl = "bcn";
	    email = "paulsmythe@smythejones.com";
		rad = "false";
		pb = "true";
		sr = "true";
		sl = "false";
		aop = "Admiralty";
		tl ="CV";
		hl="CN";
}




var delimiter 		= "^";

var args 			= location.search.substr(1).split("?");

var argstr 			= unescape(args[0]);
var stringArray 	= argstr.split(delimiter);
var name 			= stringArray[0];
var tagline 		= stringArray[1];
var street 			= stringArray[2];
var city 			= stringArray[3];
var state 			= stringArray[4];
var zip 			= stringArray[5];
var phone 			= stringArray[6];
var fax 			= stringArray[7];
var url	 			= stringArray[8];
var att1 			= stringArray[9];
var att2 			= stringArray[10];
var att3 			= stringArray[11];
var cfn 			= stringArray[12];
var fl 				= stringArray[13];


//added for old code compatabilty
if (fl == "true"){
	fl="fln";
} else if (fl == "false") {
	fl = "none";
}
//end add
var cl = stringArray[14];
//added for old code compatabilty
if (cl == "true"){
	cl="cln";
} else if (cl == "false") {
	cl = "none";
}

//end add
var tl = stringArray[23];
//added for old code compatabilty
if (tl == "true"){
	tl="tln";
} else if (tl == "false") {
	tl = "none";
}

//end add
var hl = stringArray[24];
//added for old code compatabilty
if (hl == "true"){
	hl="hln";
} else if (hl == "false") {
	hl = "none";
}

var email 			= stringArray[15];
var rad 			= stringArray[16];
var pb 				= stringArray[17];
var sr 				= stringArray[18];
var sl 				= stringArray[19];
var aop				= stringArray[20];
var aop1="Admirality";
var aop2="Civil rights";
var textInfo=stringArray[21];
//alert(stringArray[21]);
var ff = stringArray[21];
if(stringArray[20]){

		if(stringArray[20].indexOf("#")!=-1){
			var aopArray = stringArray[20].split("#");
			aop1= aopArray[0];
			aop2 = aopArray[1];
		}else{
			aop1 = stringArray[20];
		}

	}else{
		aop1= "Admirality";

	}

var divHide="display:block";
var news1 			= "";
var news2 			= "";
var news3         ="";
var news4        ="";
var news1_tab 			= "";
var news2_tab 			= "";
var news3_tab        ="";
var news4_tab        ="";
var esp="";
if(document.getElementsByTagName("meta")[0]!=null){
	if(document.getElementsByTagName("meta")[0].content.indexOf("iso-8859-1")!=-1){
	esp="_es";
	}
}


if (!(fl == "none")){
news1= loadNewsText(fl)+" Newsletter";
news1_tab= "<li><a href='javascript:showpage(\"Newsletter1"+esp+".html\")'>"+news1+"</a></li>";

}
if (!(cl == "none")){
news2= loadNewsText(cl)+" Newsletter";
news2_tab= "<li><a href='javascript:showpage(\"Newsletter2"+esp+".html\")'>"+news2+"</a></li>";
} 

if (!(tl == "none")){
news3= loadNewsText(tl)+" Newsletter";
news3_tab= "<li><a href='javascript:showpage(\"Newsletter3"+esp+".html\")'>"+news3+"</a></li>";
} 

if (!(hl == "none")){
news4= loadNewsText(hl)+" Newsletter";
news4_tab= "<li><a href='javascript:showpage(\"Newsletter4"+esp+".html\")'>"+news4+"</a></li>";
} 


/*if ((news4 == "")&&(news3 == "")&&(news2 == "")&&(news1!="") ){
news2="Immigration Newsletter";
news2_tab=  "<li><a href='javascript:showpage(\"Newsletter2"+esp+".html\")'>Immigration Newsletter</a></li>";

news3="Taxation Newsletter";
news3_tab=  "<li><a href='javascript:showpage(\"Newsletter3"+esp+".html\")'>Taxation Newsletter</a></li>";

news4="Construction Law Newsletter";
news4_tab=  "<li><a href='javascript:showpage(\"Newsletter4"+esp+".html\")'>Construction Law Newsletter</a></li>";
}

if ((news4 == "")&&(news3 == "")&&(news2 != "")&&(news1!="") ){
news3="Taxation Newsletter";
news3_tab=  "<li><a href='javascript:showpage(\"Newsletter3"+esp+".html\")'>Taxation Newsletter</a></li>";

news4="Construction Law Newsletter";
news4_tab=  "<li><a href='javascript:showpage(\"Newsletter4"+esp+".html\")'>Construction Law Newsletter</a></li>";
}

if ((news4 == "")&&(news3 != "")&&(news2 != "")&&(news1!="") ){

news4="Construction Law Newsletter";
news4_tab=  "<li><a href='javascript:showpage(\"Newsletter4"+esp+".html\")'>Construction Law Newsletter</a></li>";
}*/


if ((news1 == "")){
divHide="display:none";
}

var CFN = "<a href='javascript: openCFN();'><img border='0' src='images/CFN.gif'></a>";



function initPage(){

	if ((divHide=="display:none")){
		thisDiv = document.getElementById("NL");
		 if (thisDiv) {
		  document.getElementById("NL").style.display = "none";
		 }
		  
	}
}



function openCFN(){
	window.open ("../cfn.htm", "cfn","location=0,status=1,scrollbars=1,width=470,height=400");
}
//Function modified for rel4.2 to get and set the cookies on templateselect page
function showpage(tmp){

var delimiter = "^";
	var args = location.search.substr(1).split("?");
	templateData = getCookie("templateData");
	//alert(templateData);
	if (args != ""){	
		//alert("args present");
	}
	else if(!(templateData==null)){
	   //alert("no args ... retrieving data from cookie");
		var strArray = templateData.split(delimiter);
		loadData(strArray);
	}else{
	//alert("Setting cookie with default values");
	defineCookie();
}

	location = tmp + "?" + escape(name) + "^" + escape(tagline) + "^" + escape(street) + "^" + escape(city) + "^" + escape(state) + "^" + escape(zip) + "^" + escape(phone) + "^" + escape(fax) + "^" + escape(url) + "^" + escape(att1) + "^" + escape(att2) + "^" + escape(att3) + "^" +  escape(cfn) + "^" + escape(fl) + "^" + escape(cl) + "^" + escape(email) + "^" + escape(rad) + "^" + escape(pb) + "^" + escape(sr) + "^" + escape(sl) + "^" + escape(aop) + "^" + escape(ff) + "^" + escape(sl) + "^" + escape(tl) + "^" + escape(hl);
}
//Function modified for rel4.2 to accomodate 4 NLs
function showpageandText(tmp,text){
	location = tmp + "?" + escape(name) + "^" + escape(tagline) + "^" + escape(street) + "^" + escape(city) + "^" + escape(state) + "^" + escape(zip) + "^" + escape(phone) + "^" + escape(fax) + "^" + escape(url) + "^" + escape(att1) + "^" + escape(att2) + "^" + escape(att3) + "^" +  escape(cfn) + "^" + escape(fl) + "^" + escape(cl) + "^" + escape(email) + "^" + escape(rad) + "^" + escape(pb) + "^" + escape(sr) + "^" + escape(sl) + "^" + escape(aop)+"^" + escape(text) + "^" + escape(sl) + "^" + escape(tl) + "^" + escape(hl);
	
}

//Function modified for rel4.2 to get and set the cookies on templateselect page
function showresults(page){
	var tmp = "LDC/results.htm";
	if (rad=="true"){
		tmp = "LDC/index.htm";
	}
	
	var delimiter = "^";
	var args = location.search.substr(1).split("?");
	templateData = getCookie("templateData");
	//alert(templateData);
	if (args != ""){	
		//alert("args present");
	}
	else if(!(templateData==null)){
	   //alert("no args ... retrieving data from cookie");
		var strArray = templateData.split(delimiter);
		loadData(strArray);
	}else{
	//alert("Setting cookie with default values");
	defineCookie();
}

window.open(tmp + "?" + escape(name) + "^" + escape(tagline) + "^" + escape(street) + "^" + escape(city) + "^" + escape(state) + "^" + escape(zip) + "^" + escape(phone) + "^" + escape(fax) + "^" + escape(url) + "^" + escape(att1) + "^" + escape(att2) + "^" + escape(att3) + "^" +  escape(cfn) + "^" + escape(fl) + "^" + escape(cl) + "^" + escape(email) + "^" + escape(rad) + "^" + escape(pb) + "^" + escape(sr) + "^" + escape(sl) + "^" + escape(aop) + "^" + escape(page) + "^" + escape(tl) + "^" + escape(hl));
}

//Function added for rel4.2 to load data from cookie on templateselect page
function loadData(stringArray){

	name = unescape(stringArray[0]);
	tagline = unescape(stringArray[1]);
	street = unescape(stringArray[2]);
	city = unescape(stringArray[3]);
	state = unescape(stringArray[4]);
	zip = unescape(stringArray[5]);
	phone = unescape(stringArray[6]);
	fax = unescape(stringArray[7]);
	url = unescape(stringArray[8]);
	att1 = unescape(stringArray[9]);
	att2 = unescape(stringArray[10]);
	att3 = unescape(stringArray[11]);
	cfn = eval(stringArray[12]);
	fl = unescape(stringArray[13]);
	//added for old code compatabilty
	if (fl == "true"){
		fl="fln";
	} else if (fl == "false") {
		fl = "none";
	}
	//end add
	cl = unescape(stringArray[14]);
	//added for old code compatabilty
	if (cl == "true"){
		cl="cln";
	} else if (cl == "false") {
		cl = "none";
	}
	//end add
   tl = unescape(stringArray[23]);
	//added for old code compatabilty
	if (tl == "true"){
		tl="tln";
	} else if (tl == "false") {
		tl = "none";
	}
	//end add
	 hl = unescape(stringArray[24]);
	//added for old code compatabilty
	if (hl == "true"){
		hl="hln";
	} else if (hl == "false") {
		hl = "none";
	}
	//end add
   email = unescape(stringArray[15]);
   rad = unescape(stringArray[16]);
	if(stringArray[17]){
		pb = unescape(stringArray[17]);
	}else{
		pb = true;
	}
	if(stringArray[18]){
		sr = unescape(stringArray[18]);
	}else{
		sr = true;
	}
	if(stringArray[19]){
		//SL.checked = eval(unescape(stringArray[19]));
		sl = false;
	}else{
		sl = false;
	}
	
	
aop	= unescape(stringArray[20]);
ff	= unescape(stringArray[21]);
}


//Function modified for rel4.2 to get and set the cookies on templateselect page
function openwin(tmp){ 

var delimiter = "^";
	var args = location.search.substr(1).split("?");
	templateData = getCookie("templateData");
	//alert(templateData);
	if (args != ""){	
		//alert("args present");
	}
	else if(!(templateData==null)){
	   //alert("no args ... retrieving data from cookie");
		var strArray = templateData.split(delimiter);
		loadData(strArray);
	}else{
	//alert("Setting cookie with default values");
	defineCookie();
}
  
	window.open(tmp + "?" + escape(name) + "^" + escape(tagline) + "^" + escape(street) + "^" + escape(city) + "^" + escape(state) + "^" + escape(zip) + "^" + escape(phone) + "^" + escape(fax) + "^" + escape(url) + "^" + escape(att1) + "^" + escape(att2) + "^" + escape(att3) + "^" +  escape(cfn) + "^" + escape(fl) + "^" + escape(cl) + "^" + escape(email) + "^" + escape(rad) + "^" + escape(pb) + "^" + escape(sr) + "^" + escape(sl) + "^" + escape(aop) + "^" + escape(ff)+ "^"+ escape(sl)+ "^" + escape(tl) + "^" + escape(hl));
	
}


function loadNewsText(val){
	var s = "";
	switch( val ) {
       case "fln": s = "Family Law "; break;
       case "cln": s = "Criminal Law "; break;
       case "pin": s = "Personal Injury "; break;
	   case "bn": s = "Bankruptcy "; break;
       case "bcn": s = "Business Law "; break;
       case "eln": s = "Employment Law "; break;
       case "imn": s = "Immigration "; break;
       case "iln": s = "Insurance Law "; break;
	   case "ipn": s = "Intellectual Property "; break;
       case "ren": s = "Real Estate "; break;
       case "tn": s = "Taxation "; break;
	   case "ln": s = "General Litigation "; break;
	   case "epn": s = "Trusts & Estates "; break;	   
	   case "CV": s = "Civil Rights "; break;
       case "CN": s = "Construction Law "; break;
       case "CL": s = "Consumer Law "; break;
	   case "EL": s = "Elder Law "; break;
       case "EV": s = "Environmental Law "; break;
       case "EN": s = "Entertainment Law "; break;
       case "HE": s = "Health Care Law "; break;
       case "IL": s = "International Law "; break;
	   case "MM": s = "Medical Malpractice "; break;
       case "PL": s = "Products Liability "; break;
       case "WC": s = "Workers Compensation "; break;
	   case "aa": s = "Auto Accidents"; break;
	   case "CC": s = "Child Custody and Support Law"; break;
	   case "DL": s = "Divorce Law"; break;
	   case "DU": s = "DUI/DWI Law"; break;
	   case "TL": s = "Traffic Law"; break;

       default: s = "none";
	}
	return s;
}
var footer = "<table><tr><td valign='middle' align='right'><a href='http://www.lawyers.com' title='Find a Lawyer'><img src='../images/disclaimer_logo1.gif' border='0' alt='Find a Lawyer' title='Find a Lawyer'/></a></td><td><div class='disclaimer'><SPAN>This web site is designed for general information only. The information presented at this site should not be construed to be formal legal advice nor the formation of a lawyer/client relationship.</SPAN></div></td></tr><tr><td>&nbsp;</td><td><div class='disclaimer'><a class='disclaimer' href=\"#\" title='" + name + "'>" + name + "</a> website is powered by <a class='disclaimer' href=\"http://www.martindale.com\" title='LexisNexis Martindale-Hubbell'>LexisNexis Martindale-Hubbell</a>. </div></td></tr></table>";

var edgeFooter = "<table><tr><td valign='middle' align='right'><a href='http://www.lawyers.com' title='Find a Lawyer'><img src='../images/disclaimer_logo1.gif' border='0' alt='Find a Lawyer' title='Find a Lawyer'/></a></td><td><div class='disclaimer'><SPAN>This web site is designed for general information only. The information presented at this site should not be construed to be formal legal advice nor the formation of a lawyer/client relationship.</SPAN></div></td></tr><tr><td>&nbsp;</td><td><div class='disclaimer'><a class='disclaimer' href=\"#\" title='" + name + "'>" + name + "</a> website is powered by <a class='disclaimer' href=\"http://www.martindale.com\" title='LexisNexis Martindale-Hubbell'>LexisNexis Martindale-Hubbell</a>. </div></td></tr></table>";

function openHelp(){
	window.open("help/info.htm", "info","location=0,status=1,scrollbars=1,width=650,height=600");	
}



function swapImages(id){
	var imgSrc 			= ("img-" + id);
	var txtScr			= ("txt-" + id);
	var templateId 		= id.substring(0,id.length-1);
	var txtDest			= ("txt-" + templateId + "a");
	var imgDest			= ("img-" + templateId + "a");
	var openDest		= ("open-" + templateId + "a");
	var linkDest		= ("link-" + templateId + "a");
	var fromName		= document.getElementById(imgSrc).src;
	var args			= fromName.split("/");
	fromName			= args[args.length-1];
	fromName			= fromName.substring(2,fromName.length-4)
	var toName			= document.getElementById(imgDest).src;
	var args1			= toName.split("/");
	toName				= args1[args1.length-1];
	
	//set main image
	document.getElementById(imgDest).src 	= ("images/" + fromName + ".gif");
	document.getElementById(imgDest).alt	= fromName;
	document.getElementById(imgDest).title	= fromName;
	
	//set links
	document.getElementById(openDest).href	= ("javascript:openwin(\'" + fromName + "/index.htm\')");
	document.getElementById(linkDest).href	= ("javascript:showresults(\'../" + fromName + "/index.htm\')");
	
	//set text
	writeTxt(txtDest, fromName);
	writeTxt(txtScr, toName.substring(0,toName.length-4));
	
	//set thumbnail image
	document.getElementById(imgSrc).src		= ("images/tn" + toName);
	document.getElementById(imgSrc).alt		= toName.substring(0,toName.length-4);
	document.getElementById(imgSrc).title	= toName.substring(0,toName.length-4);

}

//when this function is invoked, div with id ='id' will go invisible and toggleId will become visible.
function toggleMe(id,toggleId){
if(id!=''){
		   document.getElementById(id).style.display = "none";
}
   		   document.getElementById(toggleId).style.display = "block";
}

//Rel4.2 Code added by Hiten
//function to implement filter functionality for layouts and navigations.
function FilterLayout(Id1,Id2,Id3,Id4,Id5,Id6,Id7){

		      document.getElementById(Id1).style.display = "block";
              document.getElementById(Id2).style.display = "none";
			  document.getElementById(Id3).style.display = "none";
			  document.getElementById(Id4).style.display = "none";
			  document.getElementById(Id5).style.display = "none";
			  document.getElementById(Id6).style.display = "none";
			  document.getElementById(Id7).style.display = "none";

//----Hannah:Code added for previous and next design func-------//
if(Id1=='L1'){
	document.getElementById('prev_3-3').style.color = 'gray';
	document.getElementById('prev_3-3').style.cursor = 'default';
	document.getElementById('next_1-7').style.color = 'gray';
	document.getElementById('next_1-7').style.cursor = 'default';
}
else if(Id1=='L2'){
	document.getElementById('prev_4-1').style.color = 'gray';
	document.getElementById('prev_4-1').style.cursor = 'default';
	document.getElementById('next_4-4').style.color = 'gray';
	document.getElementById('next_4-4').style.cursor = 'default';
}
else if((Id1=='L3') || (Id1=='H')){	
	document.getElementById('next_3-13').style.color = 'gray';
	document.getElementById('next_3-13').style.cursor = 'default';
}
else if(Id1=='V'){	
	document.getElementById('prev_3-3').style.color = 'gray';
	document.getElementById('prev_3-3').style.cursor = 'default';
	document.getElementById('prev_4-1').style.color = 'blue';
	document.getElementById('prev_4-1').style.cursor = 'pointer';
	document.getElementById('next_4-4').style.color = 'blue';
	document.getElementById('next_4-4').style.cursor = 'pointer';
	document.getElementById('next_1-7').style.color = 'blue';
	document.getElementById('next_1-7').style.cursor = 'pointer';
}
//---Hannah:Code change ends here----
}
// Rel 4.2 Code change end here

function writeTxt(id, content){
	if(document.all){
	 	document.getElementById(id).innerHTML = content;
	} else if (document.getElementById){
		rng = document.createRange();
		el = document.getElementById(id);
		rng.setStartBefore(el);
		htmlFrag = rng.createContextualFragment(content);
		while (el.hasChildNodes())
			el.removeChild(el.lastChild);
		el.appendChild(htmlFrag);
	}
	
}
var popupTimerHandle = null;
function showBoxRelative(srcOfImage,yposition,xposition)
{
	if (popupTimerHandle != null)
	{
		clearTimeout(popupTimerHandle);
		popupTimerHandle = null;
	}
	var imgDivContent = document.getElementById('magnifiedImg');
	imgDivContent.src = srcOfImage;
	var divObj = document.getElementById('imageDiv');

	divObj.style.top = yposition + 'px';
	divObj.style.left = xposition + 'px';
	divObj.style.display = 'block';
}

function hideBox(div) {
	popupTimerHandle = setTimeout("reallyHideBox('" + div + "');", 250);
}

function reallyHideBox(div) {
	divObj = document.getElementById('imageDiv');
	divObj.style.display = 'none';
}
function showBox(div) 
{
if (popupTimerHandle != null) 
	{
	clearTimeout(popupTimerHandle);
	popupTimerHandle = null;
	}
divObj = document.getElementById(div);
divObj.style.display = 'block';
}

//This is the array for storing the images
var ArrayforImgID = new Array(60);
ArrayforImgID[0] = "img1";
ArrayforImgID[1] = "img2";
ArrayforImgID[2] = "img3";
ArrayforImgID[3] = "img4";
ArrayforImgID[4] = "img5";
ArrayforImgID[5] = "img6";
ArrayforImgID[6] = "img7";
ArrayforImgID[7] = "img8";
ArrayforImgID[8] = "img9";
ArrayforImgID[9] = "img10";
ArrayforImgID[10] = "img11";
ArrayforImgID[11] = "img12";
ArrayforImgID[12] = "img13";
ArrayforImgID[13] = "img14";
ArrayforImgID[14] = "img15";
ArrayforImgID[15] = "img16";
ArrayforImgID[16] = "img17";
ArrayforImgID[17] = "img18";
ArrayforImgID[18] = "img19";
ArrayforImgID[19] = "img20";
ArrayforImgID[20] = "img21";
ArrayforImgID[21] = "img22";
ArrayforImgID[22] = "img23";
ArrayforImgID[23] = "img24";
ArrayforImgID[24] = "img25";
ArrayforImgID[25] = "img26";
ArrayforImgID[26] = "img27";
ArrayforImgID[27] = "img28";
ArrayforImgID[28] = "img29";
ArrayforImgID[29] = "img30";
ArrayforImgID[30] = "img31";
ArrayforImgID[31] = "img32";
ArrayforImgID[32] = "img33";
ArrayforImgID[33] = "img34";
ArrayforImgID[34] = "img35";
ArrayforImgID[35] = "img36";
ArrayforImgID[36] = "img37";
ArrayforImgID[37] = "img38";
ArrayforImgID[38] = "img39";
ArrayforImgID[39] = "img40";
ArrayforImgID[40] = "img41";
ArrayforImgID[41] = "img42";
ArrayforImgID[42] = "img43";
ArrayforImgID[43] = "img44";
ArrayforImgID[44] = "img45";
ArrayforImgID[45] = "img46";
ArrayforImgID[46] = "img47";
ArrayforImgID[47] = "img48";
ArrayforImgID[48] = "img49";
ArrayforImgID[49] = "img50";
ArrayforImgID[50] = "img51";
ArrayforImgID[51] = "img52";
ArrayforImgID[52] = "img53";
ArrayforImgID[53] = "img54";
ArrayforImgID[54] = "img55";
ArrayforImgID[55] = "img56";
ArrayforImgID[56] = "img57";
ArrayforImgID[57] = "img58";
ArrayforImgID[58] = "img59";
ArrayforImgID[59] = "img60";

var imageName = null;

function changeImg(img, newimg, imgid, numValue){
	document.getElementById(img).src=newimg;
	var z= 0;
	numValue=parseInt(numValue);
	z =eval(3*numValue);

	for(i=0;i<3;i++){
		document.getElementById(ArrayforImgID[z+i]).style.borderColor = '#FFFFFF';
		document.getElementById(ArrayforImgID[z+i]).style.cursor = 'pointer';
	}
	imageName = document.getElementById(imgid).name;
	document.getElementById(imgid).border=3;
	document.getElementById(imgid).style.borderColor = '#fd9e09';
	document.getElementById(imgid).style.cursor = 'default';
}

function resetX(){
	document.getElementById('cover').style.display = "none";
}

function setVisibility(id, visibility, xval, yval, xid, yid,top){
	if(id == "colorThemes_3-1"){
		changeImg('rhtPane', 'images/3-1_01_Verdana.gif', 'img1','0');
	}
	else if(id == "colorThemes_3-2"){
		changeImg('rhtPane1', 'images/3-2_01_Verdana.gif', 'img4','1');
	}
	else if(id == "colorThemes_3-3"){
		changeImg('rhtPane2', 'images/3-3_01_Verdana.gif', 'img7','2');	
	}
	else if(id == "colorThemes_3-4"){
		changeImg('rhtPane3', 'images/3-4_01_Verdana.gif', 'img10','3');	
	}
	else if(id == "colorThemes_3-5"){
		changeImg('rhtPane4', 'images/3-5_01_Verdana.gif', 'img13','4');	
	}
	else if(id == "colorThemes_3-6"){
		changeImg('rhtPane5', 'images/3-6_01_Verdana.gif', 'img16','5');		
	}
	else if(id == "colorThemes_3-7"){
		changeImg('rhtPane6', 'images/3-7_01_Verdana.gif', 'img19','6');		
	}
	else if(id == "colorThemes_3-8"){
		changeImg('rhtPane7', 'images/3-8_01_Verdana.gif', 'img22','7');		
	}
	else if(id == "colorThemes_3-9"){
		changeImg('rhtPane8', 'images/3-9_01_Verdana.gif', 'img25','8');		
	}
	else if(id == "colorThemes_4-1"){
		changeImg('rhtPane9', 'images/4-1_01_Verdana.gif', 'img28','9');		
	}
	else if(id == "colorThemes_4-2"){
		changeImg('rhtPane10', 'images/4-2_01_Verdana.gif', 'img31','10');			
	}
	else if(id == "colorThemes_2-1"){
		changeImg('rhtPane11', 'images/2-1_01_Verdana.gif', 'img34','11');
	}
	else if(id == "colorThemes_2-2"){
		changeImg('rhtPane12', 'images/2-2_01_Verdana.gif', 'img37','12');
	}
	else if(id == "colorThemes_1-1"){
		changeImg('rhtPane13', 'images/1-1_01_Verdana.gif', 'img40','13');
	}
	else if(id == "colorThemes_1-2"){	
		changeImg('rhtPane14', 'images/1-2_01_Verdana.gif', 'img43','14');
	}
	else if(id == "colorThemes_1-3"){
		changeImg('rhtPane15', 'images/1-3_01_Verdana.gif', 'img46','15');
	}
	else if(id == "colorThemes_1-7"){
		changeImg('rhtPane16', 'images/1-7_01_Verdana.gif', 'img49','16');
	}
	else if(id == "colorThemes_2-3"){
		changeImg('rhtPane17', 'images/2-3_01_Verdana.gif', 'img52','17');
	}
	else if(id == "colorThemes_3-13"){
		changeImg('rhtPane18', 'images/3-13_01_Verdana.gif', 'img55','18');
	}
	else if(id == "colorThemes_4-4"){
		changeImg('rhtPane19', 'images/4-4_01_Verdana.gif', 'img58','19');
	}
	
	document.getElementById(id).style.display = visibility;
	document.getElementById(xid).innerHTML = xval;
	document.getElementById(yid).innerHTML = yval;	
	if(top==0)
	{
		var scrOfY = 0;
	  	if( typeof( window.pageYOffset ) == 'number' ) {
	    		//Netscape compliant
	   		 scrOfY = window.pageYOffset;	    		
	  	} 
	  	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	    		//DOM compliant
	    		scrOfY = document.body.scrollTop;	    		
	  	} 
	  	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	    		//IE6 standards compliant mode
	    		scrOfY = document.documentElement.scrollTop;	    		
	  	}	
		document.getElementById(id).style.top = eval(scrOfY+20)+'px';	
		var _docHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;
		var _docWidth = (document.width !== undefined) ? document.width : document.body.offsetWidth;
		var cancelfactor =0;
		document.getElementById('cover').style.display = "block";
		if(document.getElementById(id).offsetTop > (_docHeight - 565)){
			cancelfactor = 94;
		}
		else if(document.getElementById(id).offsetTop > (_docHeight - 600)){
			cancelfactor = 44;
		}
		document.getElementById('cover').style.height= _docHeight + cancelfactor + 'px';
		document.getElementById('cover').style.width= _docWidth + 'px';
	}
	else
	{
		document.getElementById(id).style.top = top;
			
	}
}

function preDesign(){
var theme1 = document.getElementById('colorThemes_3-1');
var theme2 = document.getElementById('colorThemes_3-2');
var theme3 = document.getElementById('colorThemes_3-3');
var theme4 = document.getElementById('colorThemes_3-4');
var theme5 = document.getElementById('colorThemes_3-5');
var theme6 = document.getElementById('colorThemes_3-6');
var theme7 = document.getElementById('colorThemes_3-7');
var theme8 = document.getElementById('colorThemes_3-8');
var theme9 = document.getElementById('colorThemes_3-9');
var theme10 = document.getElementById('colorThemes_4-1');
var theme11 = document.getElementById('colorThemes_4-2');
var theme12 = document.getElementById('colorThemes_2-1');
var theme13 = document.getElementById('colorThemes_2-2');
var theme14 = document.getElementById('colorThemes_1-1');
var theme15 = document.getElementById('colorThemes_1-2');
var theme16 = document.getElementById('colorThemes_1-3');
var theme17 = document.getElementById('colorThemes_1-7');
var theme18 = document.getElementById('colorThemes_2-3');
var theme19 = document.getElementById('colorThemes_3-13');
var theme20 = document.getElementById('colorThemes_4-4');
var top;
if(document.getElementById('L1').style.display == "block"){
	if(theme3.style.display == "inline"){		
	}
	else if(theme4.style.display == "inline"){
		top = theme4.style.top;
		theme4.style.display = "none";
		setVisibility('colorThemes_3-3','inline','1','7','numx_3-3','numy_3-3',top);
	}
	else if(theme9.style.display == "inline"){
			top = theme9.style.top;
			theme9.style.display = "none";
			setVisibility('colorThemes_3-4','inline','2','7','numx_3-4','numy_3-4',top);
	}
	else if(theme14.style.display == "inline"){
			top = theme14.style.top;
			theme14.style.display = "none";
			setVisibility('colorThemes_3-9','inline','3','7','numx_3-9','numy_3-9',top);
	}
	else if(theme15.style.display == "inline"){
			top = theme15.style.top;
			theme15.style.display = "none";
			setVisibility('colorThemes_1-1','inline','4','7','numx_1-1','numy_1-1',top);
	}
	else if(theme16.style.display == "inline"){
			top = theme16.style.top;
			theme16.style.display = "none";
			setVisibility('colorThemes_1-2','inline','5','7','numx_1-2','numy_1-2',top);	
	}
	else if(theme17.style.display == "inline"){
			top = theme17.style.top;
			theme17.style.display = "none";
			setVisibility('colorThemes_1-3','inline','6','7','numx_1-3','numy_1-3',top);	
	}
}
else if(document.getElementById('L2').style.display == "block"){
	if(theme10.style.display == "inline"){		
	}
	else if(theme11.style.display == "inline"){
		top = theme11.style.top;
		theme11.style.display = "none";
		setVisibility('colorThemes_4-1','inline','1','6','numx_4-1','numy_4-1',top);
	}
	else if(theme12.style.display == "inline"){
		top = theme12.style.top;
		theme12.style.display = "none";
		setVisibility('colorThemes_4-2','inline','2','6','numx_4-2','numy_4-2',top);
	}
	else if(theme13.style.display == "inline"){
		top = theme13.style.top;
		theme13.style.display = "none";
		setVisibility('colorThemes_2-1','inline','3','6','numx_2-1','numy_2-1',top);

	}
	else if(theme18.style.display == "inline"){
		top = theme18.style.top;
		theme18.style.display = "none";
		setVisibility('colorThemes_2-2','inline','4','6','numx_2-2','numy_2-2',top);
	
	}
	else if(theme20.style.display == "inline"){
		top = theme20.style.top;
		theme20.style.display = "none";
		setVisibility('colorThemes_2-3','inline','5','6','numx_2-3','numy_2-3',top);
	
	}
}
else if((document.getElementById('L3').style.display == "block") || (document.getElementById('H').style.display == "block")){
	if(theme1.style.display == "inline"){
	}
	else if(theme2.style.display == "inline"){
		top = theme2.style.top;
		theme2.style.display = "none";
		setVisibility('colorThemes_3-1','inline','1','7','numx_3-1','numy_3-1',top);
	}
	else if(theme5.style.display == "inline"){
		top = theme5.style.top;
		theme5.style.display = "none";
		setVisibility('colorThemes_3-2','inline','2','7','numx_3-2','numy_3-2',top);
	}
	else if(theme6.style.display == "inline"){
		top = theme6.style.top;
		theme6.style.display = "none";
		setVisibility('colorThemes_3-5','inline','3','7','numx_3-5','numy_3-5',top);
	}
	else if(theme7.style.display == "inline"){
		top = theme7.style.top;
		theme7.style.display = "none";
		setVisibility('colorThemes_3-6','inline','4','7','numx_3-6','numy_3-6',top);
	}
	else if(theme8.style.display == "inline"){
		top = theme8.style.top;
		theme8.style.display = "none";
		setVisibility('colorThemes_3-7','inline','5','7','numx_3-7','numy_3-7',top);
	}
	else if(theme19.style.display == "inline"){
		top = theme19.style.top;
		theme19.style.display = "none";
		setVisibility('colorThemes_3-8','inline','6','7','numx_3-8','numy_3-8',top);
	}
}
else if(document.getElementById('V').style.display == "block"){
	if(theme3.style.display == "inline"){		
	}
	else if(theme4.style.display == "inline"){
		top = theme4.style.top;
		theme4.style.display = "none";
		setVisibility('colorThemes_3-3','inline','1','13','numx_3-3','numy_3-3',top);
	}
	else if(theme9.style.display == "inline"){
		top = theme9.style.top;
		theme9.style.display = "none";
		setVisibility('colorThemes_3-4','inline','2','13','numx_3-4','numy_3-4',top);
	}
	else if(theme10.style.display == "inline"){
		top = theme10.style.top;
		theme10.style.display = "none";
		setVisibility('colorThemes_3-9','inline','3','13','numx_3-9','numy_3-9',top);
	}
	else if(theme11.style.display == "inline"){
		top = theme11.style.top;
		theme11.style.display = "none";
		setVisibility('colorThemes_4-1','inline','4','13','numx_4-1','numy_4-1',top);
	}
	else if(theme12.style.display == "inline"){
		top = theme12.style.top;
		theme12.style.display = "none";
		setVisibility('colorThemes_4-2','inline','5','13','numx_4-2','numy_4-2',top);
	}
	else if(theme13.style.display == "inline"){
		top = theme13.style.top;
		theme13.style.display = "none";
		setVisibility('colorThemes_2-1','inline','6','13','numx_2-1','numy_2-1',top);
	}
	else if(theme14.style.display == "inline"){
		top = theme14.style.top;
		theme14.style.display = "none";
		setVisibility('colorThemes_2-2','inline','7','13','numx_2-2','numy_2-2',top);
	}
	else if(theme15.style.display == "inline"){
		top = theme15.style.top;
		theme15.style.display = "none";
		setVisibility('colorThemes_1-1','inline','8','13','numx_1-1','numy_1-1',top);
	}
	else if(theme16.style.display == "inline"){
		top = theme16.style.top;
		theme16.style.display = "none";
		setVisibility('colorThemes_1-2','inline','9','13','numx_1-2','numy_1-2',top);
	}
	else if(theme17.style.display == "inline"){
		top = theme17.style.top;
		theme17.style.display = "none";
		setVisibility('colorThemes_1-3','inline','10','13','numx_1-3','numy_1-3',top);
	}
	else if(theme18.style.display == "inline"){
		top = theme18.style.top;
		theme18.style.display = "none";
		setVisibility('colorThemes_1-7','inline','11','13','numx_1-7','numy_1-7',top);
	}
	else if(theme20.style.display == "inline"){
		top = theme20.style.top;
		theme20.style.display = "none";
		setVisibility('colorThemes_2-3','inline','12','13','numx_2-3','numy_2-3',top);
	}
}
else{
	if(theme1.style.display == "inline"){		
	}
	else if(theme2.style.display == "inline"){		
		top = theme2.style.top;
		theme2.style.display = "none";
		setVisibility('colorThemes_3-1','inline','1','20','numx_3-1','numy_3-1',top);
	}
	else if(theme3.style.display == "inline"){		
			top = theme3.style.top;
			theme3.style.display = "none";
			setVisibility('colorThemes_3-2','inline','2','20','numx_3-2','numy_3-2',top);
	}
	else if(theme4.style.display == "inline"){		
			top = theme4.style.top;
			theme4.style.display = "none";
			setVisibility('colorThemes_3-3','inline','3','20','numx_3-3','numy_3-3',top);
	}
	else if(theme5.style.display == "inline"){		
			top = theme5.style.top;
			theme5.style.display = "none";
			setVisibility('colorThemes_3-4','inline','4','20','numx_3-4','numy_3-4',top);
	}
	else if(theme6.style.display == "inline"){		
			top = theme6.style.top;
			theme6.style.display = "none";
			setVisibility('colorThemes_3-5','inline','5','20','numx_3-5','numy_3-5',top);
	}
	else if(theme7.style.display == "inline"){		
			top = theme7.style.top;
			theme7.style.display = "none";
			setVisibility('colorThemes_3-6','inline','6','20','numx_3-6','numy_3-6',top);
	}
	else if(theme8.style.display == "inline"){		
			top = theme8.style.top;
			theme8.style.display = "none";
			setVisibility('colorThemes_3-7','inline','7','20','numx_3-7','numy_3-7',top);
	}
	else if(theme9.style.display == "inline"){		
			top = theme9.style.top;
			theme9.style.display = "none";
			setVisibility('colorThemes_3-8','inline','8','20','numx_3-8','numy_3-8',top);
	}
	else if(theme10.style.display == "inline"){		
			top = theme10.style.top;
			theme10.style.display = "none";
			setVisibility('colorThemes_3-9','inline','9','20','numx_3-9','numy_3-9',top);
	}
	else if(theme11.style.display == "inline"){		
			top = theme11.style.top;
			theme11.style.display = "none";
			setVisibility('colorThemes_4-1','inline','10','20','numx_4-1','numy_4-1',top);
	}
	else if(theme12.style.display == "inline"){		
			top = theme12.style.top;
			theme12.style.display = "none";
			setVisibility('colorThemes_4-2','inline','11','20','numx_4-2','numy_4-2',top);
	}
	else if(theme13.style.display == "inline"){		
			top = theme13.style.top;
			theme13.style.display = "none";
			setVisibility('colorThemes_2-1','inline','12','20','numx_2-1','numy_2-1',top);
	}
	else if(theme14.style.display == "inline"){		
			top = theme14.style.top;
			theme14.style.display = "none";
			setVisibility('colorThemes_2-2','inline','13','20','numx_2-2','numy_2-2',top);
	}
	else if(theme15.style.display == "inline"){		
			top = theme15.style.top;
			theme15.style.display = "none";
			setVisibility('colorThemes_1-1','inline','14','20','numx_1-1','numy_1-1',top);
	}
	else if(theme16.style.display == "inline"){
			top = theme16.style.top;
			theme16.style.display = "none";
			setVisibility('colorThemes_1-2','inline','15','20','numx_1-2','numy_1-2',top);
	}
	else if(theme17.style.display == "inline"){
			top = theme17.style.top;
			theme17.style.display = "none";
			setVisibility('colorThemes_1-3','inline','16','20','numx_1-3','numy_1-3',top);
	}
	else if(theme18.style.display == "inline"){
			top = theme18.style.top;
			theme18.style.display = "none";
			setVisibility('colorThemes_1-7','inline','17','20','numx_1-7','numy_1-7',top);
	}
	else if(theme19.style.display == "inline"){
			top = theme19.style.top;
			theme19.style.display = "none";
			setVisibility('colorThemes_2-3','inline','18','20','numx_2-3','numy_2-3',top);
	}
	else if(theme20.style.display == "inline"){
			top = theme20.style.top;
			theme20.style.display = "none";
			setVisibility('colorThemes_3-13','inline','19','20','numx_3-13','numy_3-13',top);
	}
}

}

function nexDesign(){
var theme1 = document.getElementById('colorThemes_3-1');
var theme2 = document.getElementById('colorThemes_3-2');
var theme3 = document.getElementById('colorThemes_3-3');
var theme4 = document.getElementById('colorThemes_3-4');
var theme5 = document.getElementById('colorThemes_3-5');
var theme6 = document.getElementById('colorThemes_3-6');
var theme7 = document.getElementById('colorThemes_3-7');
var theme8 = document.getElementById('colorThemes_3-8');
var theme9 = document.getElementById('colorThemes_3-9');
var theme10 = document.getElementById('colorThemes_4-1');
var theme11 = document.getElementById('colorThemes_4-2');
var theme12 = document.getElementById('colorThemes_2-1');
var theme13 = document.getElementById('colorThemes_2-2');
var theme14 = document.getElementById('colorThemes_1-1');
var theme15 = document.getElementById('colorThemes_1-2');
var theme16 = document.getElementById('colorThemes_1-3');
var theme17 = document.getElementById('colorThemes_1-7');
var theme18 = document.getElementById('colorThemes_2-3');
var theme19 = document.getElementById('colorThemes_3-13');
var theme20 = document.getElementById('colorThemes_4-4');
var top;
if(document.getElementById('L1').style.display == "block"){
	if(theme3.style.display == "inline"){		
		top = theme3.style.top;
		theme3.style.display = "none";
		setVisibility('colorThemes_3-4','inline','2','7','numx_3-4','numy_3-4',top);
	}
	else if(theme4.style.display == "inline"){
		top = theme4.style.top;
		theme4.style.display = "none";
		setVisibility('colorThemes_3-9','inline','3','7','numx_3-9','numy_3-9',top);
	}
	else if(theme9.style.display == "inline"){
			top = theme9.style.top;
			theme9.style.display = "none";
			setVisibility('colorThemes_1-1','inline','4','7','numx_1-1','numy_1-1',top);
	}
	else if(theme14.style.display == "inline"){
			top = theme14.style.top;
			theme14.style.display = "none";
			setVisibility('colorThemes_1-2','inline','5','7','numx_1-2','numy_1-2',top);
	}
	else if(theme15.style.display == "inline"){
			top = theme15.style.top;
			theme15.style.display = "none";
			setVisibility('colorThemes_1-3','inline','6','7','numx_1-3','numy_1-3',top);
	}
	else if(theme16.style.display == "inline"){
			top = theme16.style.top;
			theme16.style.display = "none";
			setVisibility('colorThemes_1-7','inline','7','7','numx_1-7','numy_1-7',top);
	}
	else if(theme17.style.display == "inline"){
			
	}
}
else if(document.getElementById('L2').style.display == "block"){
	if(theme10.style.display == "inline"){		
		top = theme10.style.top;
		theme10.style.display = "none";
		setVisibility('colorThemes_4-2','inline','2','6','numx_4-2','numy_4-2',top);
	}
	else if(theme11.style.display == "inline"){
		top = theme11.style.top;
		theme11.style.display = "none";
		setVisibility('colorThemes_2-1','inline','3','6','numx_2-1','numy_2-1',top);
	}
	else if(theme12.style.display == "inline"){
			top = theme12.style.top;
			theme12.style.display = "none";
			setVisibility('colorThemes_2-2','inline','4','6','numx_2-2','numy_2-2',top);
	}
	else if(theme13.style.display == "inline"){
			top = theme13.style.top;
			theme13.style.display = "none";
			setVisibility('colorThemes_2-3','inline','5','6','numx_2-3','numy_2-3',top);
	}
	else if(theme18.style.display == "inline"){
			top = theme18.style.top;
			theme18.style.display = "none";
			setVisibility('colorThemes_4-4','inline','6','6','numx_4-4','numy_4-4',top);
	}
	else if(theme20.style.display == "inline"){			
	}	
}
else if((document.getElementById('L3').style.display == "block") || (document.getElementById('H').style.display == "block")){
	if(theme1.style.display == "inline"){
		top = theme1.style.top;
		theme1.style.display = "none";
		setVisibility('colorThemes_3-2','inline','2','7','numx_3-2','numy_3-2',top);
	}
	else if(theme2.style.display == "inline"){
		top = theme2.style.top;
		theme2.style.display = "none";
		setVisibility('colorThemes_3-5','inline','3','7','numx_3-5','numy_3-5',top);
	}
	else if(theme5.style.display == "inline"){
		top = theme5.style.top;
		theme5.style.display = "none";
		setVisibility('colorThemes_3-6','inline','4','7','numx_3-6','numy_3-6',top);
	}
	else if(theme6.style.display == "inline"){
		top = theme6.style.top;
		theme6.style.display = "none";
		setVisibility('colorThemes_3-7','inline','5','7','numx_3-7','numy_3-7',top);
	}
	else if(theme7.style.display == "inline"){
		top = theme7.style.top;
		theme7.style.display = "none";
		setVisibility('colorThemes_3-8','inline','6','7','numx_3-8','numy_3-8',top);
	}
	else if(theme8.style.display == "inline"){
		top = theme8.style.top;
		theme8.style.display = "none";
		setVisibility('colorThemes_3-13','inline','7','7','numx_3-13','numy_3-13',top);
	}
	else if(theme19.style.display == "inline"){
	}
}
else if(document.getElementById('V').style.display == "block"){
	if(theme3.style.display == "inline"){		
		top = theme3.style.top;
		theme3.style.display = "none";
		setVisibility('colorThemes_3-4','inline','2','13','numx_3-4','numy_3-4',top);
	}
	else if(theme4.style.display == "inline"){
		top = theme4.style.top;
		theme4.style.display = "none";
		setVisibility('colorThemes_3-9','inline','3','13','numx_3-9','numy_3-9',top);
	}
	else if(theme9.style.display == "inline"){
		top = theme9.style.top;
		theme9.style.display = "none";
		setVisibility('colorThemes_4-1','inline','4','13','numx_4-1','numy_4-1',top);
	}
	else if(theme10.style.display == "inline"){
		top = theme10.style.top;
		theme10.style.display = "none";
		setVisibility('colorThemes_4-2','inline','5','13','numx_4-2','numy_4-2',top);
	}
	else if(theme11.style.display == "inline"){
		top = theme11.style.top;
		theme11.style.display = "none";
		setVisibility('colorThemes_2-1','inline','6','13','numx_2-1','numy_2-1',top);
	}
	else if(theme12.style.display == "inline"){
		top = theme12.style.top;
		theme12.style.display = "none";
		setVisibility('colorThemes_2-2','inline','7','13','numx_2-2','numy_2-2',top);
	}
	else if(theme13.style.display == "inline"){
		top = theme13.style.top;
		theme13.style.display = "none";
		setVisibility('colorThemes_1-1','inline','8','13','numx_1-1','numy_1-1',top);
	}
	else if(theme14.style.display == "inline"){
		top = theme14.style.top;
		theme14.style.display = "none";
		setVisibility('colorThemes_1-2','inline','9','13','numx_1-2','numy_1-2',top);
	}
	else if(theme15.style.display == "inline"){
		top = theme15.style.top;
		theme15.style.display = "none";
		setVisibility('colorThemes_1-3','inline','10','13','numx_1-3','numy_1-3',top);
	}
	else if(theme16.style.display == "inline"){
		top = theme16.style.top;
		theme16.style.display = "none";
		setVisibility('colorThemes_1-7','inline','11','13','numx_1-7','numy_1-7',top);
	}
	else if(theme17.style.display == "inline"){
		top = theme17.style.top;
		theme17.style.display = "none";
		setVisibility('colorThemes_2-3','inline','12','13','numx_2-3','numy_2-3',top);
	}
	else if(theme18.style.display == "inline"){
		top = theme18.style.top;
		theme18.style.display = "none";
		setVisibility('colorThemes_4-4','inline','13','13','numx_4-4','numy_4-4',top);
	}
	else if(theme20.style.display == "inline"){
	}
}
else{
	if(theme1.style.display == "inline"){

		top = theme1.style.top;
		theme1.style.display = "none";
		setVisibility('colorThemes_3-2','inline','2','20','numx_3-2','numy_3-2',top);
	}
	else if(theme2.style.display == "inline"){		
		top = theme2.style.top;
		theme2.style.display = "none";
		setVisibility('colorThemes_3-3','inline','3','20','numx_3-3','numy_3-3',top);
	}
	else if(theme3.style.display == "inline"){		
			top = theme3.style.top;
			theme3.style.display = "none";
			setVisibility('colorThemes_3-4','inline','4','20','numx_3-4','numy_3-4',top);
	}
	else if(theme4.style.display == "inline"){		
			top = theme4.style.top;
			theme4.style.display = "none";
			setVisibility('colorThemes_3-5','inline','5','20','numx_3-5','numy_3-5',top);
	}
	else if(theme5.style.display == "inline"){		
			top = theme5.style.top;
			theme5.style.display = "none";
			setVisibility('colorThemes_3-6','inline','6','20','numx_3-6','numy_3-6',top);
	}
	else if(theme6.style.display == "inline"){		
			top = theme6.style.top;
			theme6.style.display = "none";
			setVisibility('colorThemes_3-7','inline','7','20','numx_3-7','numy_3-7',top);
	}
	else if(theme7.style.display == "inline"){		
			top = theme7.style.top;
			theme7.style.display = "none";
			setVisibility('colorThemes_3-8','inline','8','20','numx_3-8','numy_3-8',top);
	}
	else if(theme8.style.display == "inline"){		
			top = theme8.style.top;
			theme8.style.display = "none";
			setVisibility('colorThemes_3-9','inline','9','20','numx_3-9','numy_3-9',top);
	}
	else if(theme9.style.display == "inline"){		
			top = theme9.style.top;
			theme9.style.display = "none";
			setVisibility('colorThemes_4-1','inline','10','20','numx_4-1','numy_4-1',top);
	}
	else if(theme10.style.display == "inline"){		
			top = theme10.style.top;
			theme10.style.display = "none";
			setVisibility('colorThemes_4-2','inline','11','20','numx_4-2','numy_4-2',top);
	}
	else if(theme11.style.display == "inline"){		
			top = theme11.style.top;
			theme11.style.display = "none";
			setVisibility('colorThemes_2-1','inline','12','20','numx_2-1','numy_2-1',top);
	}
	else if(theme12.style.display == "inline"){		
			top = theme12.style.top;
			theme12.style.display = "none";
			setVisibility('colorThemes_2-2','inline','13','20','numx_2-2','numy_2-2',top);
	}
	else if(theme13.style.display == "inline"){		
			top = theme13.style.top;
			theme13.style.display = "none";
			setVisibility('colorThemes_1-1','inline','14','20','numx_1-1','numy_1-1',top);
	}
	else if(theme14.style.display == "inline"){		
			top = theme14.style.top;
			theme14.style.display = "none";
			setVisibility('colorThemes_1-2','inline','15','20','numx_1-2','numy_1-2',top);
	}
	else if(theme15.style.display == "inline"){		
			top = theme15.style.top;
			theme15.style.display = "none";
			setVisibility('colorThemes_1-3','inline','16','20','numx_1-3','numy_1-3',top);
	}
	else if(theme16.style.display == "inline"){		
				top = theme16.style.top;
				theme16.style.display = "none";
				setVisibility('colorThemes_1-7','inline','17','20','numx_1-7','numy_1-7',top);
	}
	else if(theme17.style.display == "inline"){		
				top = theme17.style.top;
				theme17.style.display = "none";
				setVisibility('colorThemes_2-3','inline','18','20','numx_2-3','numy_2-3',top);
	}
	else if(theme18.style.display == "inline"){		
				top = theme18.style.top;
				theme18.style.display = "none";
				setVisibility('colorThemes_3-13','inline','19','20','numx_3-13','numy_3-13',top);
	}
	else if(theme19.style.display == "inline"){		
				top = theme19.style.top;
				theme19.style.display = "none";
				setVisibility('colorThemes_4-4','inline','20','20','numx_4-4','numy_4-4',top);
	}
	else if(theme20.style.display == "inline"){			
	}
}
}
function viewsite(){
openwin(imageName+'/index.html');
}
