function loadFormProperties () {
	var headerHeight = document.getElementById("header_top").offsetHeight;
	var leftHeight = document.getElementById("left_content").offsetHeight;
	var rightHeight = document.getElementById("right_content").offsetHeight;
	var maxHeight = rightHeight > leftHeight ? rightHeight : leftHeight;
	
	if(document.getElementById("separator") != null ){
		document.getElementById("separator").style.top    = headerHeight;
		document.getElementById("separator").style.height = maxHeight;
	}
		
	var totalHeightRight = document.getElementById("right_content").offsetHeight+headerHeight;
	var totalHeightLeft = document.getElementById("left_content").offsetHeight+headerHeight;
	var totalHeight = 0;
	if(totalHeightRight>totalHeightLeft)
		totalHeight = totalHeightRight
	else 
		totalHeight = totalHeightLeft
		
	if(document.getElementById("tyextra") != null ){
		document.getElementById("container").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+300;
		document.getElementById("button4").style.top = document.getElementById("thankyoupagecopymain").offsetHeight+150;
		document.getElementById("processing4").style.top = document.getElementById("thankyoupagecopymain").offsetHeight+150;
		document.getElementById("leftbody").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+280;
		document.getElementById("rightbody").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+280;
		document.getElementById("footertxt_sitemap").style.top    = document.getElementById("thankyoupagecopymain").offsetHeight+220;
		document.getElementById("footertxt").style.top    = document.getElementById("thankyoupagecopymain").offsetHeight+220;

	}else if(document.getElementById("thankyoupagecopymain") != null && document.getElementById("tyextra") == null){
		document.getElementById("container").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+300;
/*		document.getElementById("button4").style.top = document.getElementById("thankyoupagecopymain").offsetHeight+150;
		document.getElementById("processing4").style.top = document.getElementById("thankyoupagecopymain").offsetHeight+150;*/
		document.getElementById("leftbody").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+280;
		document.getElementById("rightbody").style.height = document.getElementById("thankyoupagecopymain").offsetHeight+280;
		document.getElementById("footertxt_sitemap").style.top    = document.getElementById("thankyoupagecopymain").offsetHeight+220;
		document.getElementById("footertxt").style.top    = document.getElementById("thankyoupagecopymain").offsetHeight+220;

	}
	else{ 
		document.getElementById("container").style.height = totalHeight+headerHeight;
		document.getElementById("leftbody").style.height = totalHeight+175;
		document.getElementById("rightbody").style.height = totalHeight+175;
		document.getElementById("footertxt_sitemap").style.top    = headerHeight + maxHeight + 100;
		document.getElementById("footertxt").style.top    = headerHeight + maxHeight + 100;
	}

}

function loadSpecProperties() {	
	var headerHeight = document.getElementById("speccontext_inner_txt").offsetHeight + 100;
	document.getElementById("speccontainer").style.height = headerHeight - 10;
	document.getElementById("closewindow_dn").style.top=headerHeight+40;
	document.getElementById("speccontext_inner").style.height = headerHeight -90;	
	document.getElementById("speccontext").style.height = headerHeight -90;	
}

function nonFormCSS() {
	
	var copyHeight = document.getElementById("nonformcontents").offsetHeight;	
	var thxpage = document.getElementById("thankyoupagecopy");
	if(document.getElementById("thankyoupagecopymain") != null)
		thxpage = document.getElementById("thankyoupagecopymain");	
	if(thxpage != null && thxpage.offsetHeight > 200) copyHeight = thxpage.offsetHeight;

	if(document.getElementById("thankyoupagecopy1") != null ){

		if(document.getElementById("logoTable") != null){
			if(document.getElementById("extraV") != null){
				document.getElementById("thankyoupagecopy1").style.top=document.getElementById("logoTable").offsetHeight+280;
				document.getElementById("footertxt").style.top=copyHeight+765;
			}
			else{
				document.getElementById("thankyoupagecopy1").style.top=document.getElementById("logoTable").offsetHeight+80;			
				document.getElementById("footertxt").style.top=copyHeight+535;
			}
			document.getElementById("vendorseparator").style.top=document.getElementById("logoTable").offsetHeight+50;
		}
		if(document.getElementById("ffootertxt_sitemap") != null)
			document.getElementById("footertxt_sitemap").style.top=copyHeight+535;	
	}else{
		if(document.getElementById("footertxt") != null)
			document.getElementById("footertxt").style.top=copyHeight+245;
		if(document.getElementById("ffootertxt_sitemap") != null)
			document.getElementById("footertxt_sitemap").style.top=copyHeight+245;
	}
////////////////////////////////////	
	var totalHeight = 0;
	if(document.getElementById("extraV") != null ){
		totalHeight = document.getElementById("nonformpagecopy").offsetHeight+document.getElementById("extraV").offsetHeight+copyHeight-300;
		document.getElementById("rightbody").style.height = totalHeight-80;
	}
	else{
		totalHeight = document.getElementById("nonformpagecopy").offsetHeight+copyHeight;
		document.getElementById("rightbody").style.height = totalHeight;//+450;
	}

////////////////////////////////////		
	if(document.getElementById("thankyoupagecopymain") != null)
		totalHeight = document.getElementById("thankyoupagecopymain").offsetHeight-150;
	document.getElementById("container").style.height = totalHeight+490;
	document.getElementById("leftbody").style.height = totalHeight+490;
	
	if(document.getElementById("ctcExtraV") != null ){
		if (navigator.appVersion.indexOf("MSIE")!=-1)
			document.getElementById("ctcExtraV").style.top = document.getElementById("thankyoupagecopy").offsetHeight+220;
		else
			document.getElementById("ctcExtraV").style.top = document.getElementById("thankyoupagecopy").offsetHeight+180;
	}
}

function openWin(page,vwidth,vheight) {
    var win_width = vwidth;
    var win_height = vheight;
    var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    var win = window.open(page, 'MyWin', options);
    if (window.focus) { win.focus() }
 
}

function checkAll(box)
{				
	var mybox=eval("document.forms['form']." + box);
	for (i=0;i<mybox.length;i++)
	{		
		mybox[i].checked=true;
	}		  
}
function check_All(box)
{						
	var mybox=eval("document.forms['form']." + box);
		
	if(mybox != null && mybox.length == null)
		mybox.checked = true;				
	for (i=0;i<mybox.length;i++)
	{		
		mybox[i].checked=true;
	}		  
}
function loadSiteMapProperties(){
	
	var leftHeight = document.getElementById("leftpanel").offsetHeight;
	var rightHeight = document.getElementById("sitemapcontent").offsetHeight;
	
	var maxHeight = rightHeight;
	if(rightHeight < leftHeight)
		 maxHeight = leftHeight;
		 
	document.getElementById("leftpanel").style.height = maxHeight;
	document.getElementById("sitemapcontent").style.height = maxHeight;
	document.getElementById("right_content").style.height = maxHeight;
	document.getElementById("container").style.height = maxHeight + 87 + "px";	
	document.getElementById("footer").style.top = maxHeight + 87 + "px";
	
}
function loadSiteMapProperties1(id){
	
	var iId = id;
	var leftHeight = document.getElementById("leftpanel").offsetHeight;
	var rightHeight = document.getElementById(iId).offsetHeight;
	
	var maxHeight = rightHeight;	
	if(rightHeight < leftHeight)
		 maxHeight = leftHeight;
		 
	maxHeight +=  150;
		 
	document.getElementById("leftpanel").style.height = maxHeight;
	document.getElementById(iId).style.height = maxHeight;
	document.getElementById("sitemapcontent").style.height = maxHeight;
	document.getElementById("right_content").style.height = maxHeight;	
	document.getElementById("container").style.height = maxHeight + 87 + "px";	
	document.getElementById("footer").style.top = maxHeight + 87 + "px";
	
}
function showAllTours(vendorid){

	var unFiltered = document.getElementsByTagName('div');

	document.getElementById("viewAll"+vendorid).className = 'thideTour';

	for (i = 0; i < unFiltered.length; i++) {
		var divId = unFiltered[i].getAttribute('id');		
		if (divId == vendorid) {			
			unFiltered[i].className ='tshowTour';
		}
	}
	loadFormProperties();
}
function showAllTours_nonForm(vendorid){

	var unFiltered = document.getElementsByTagName('div');

	document.getElementById("viewAll"+vendorid).className = 'thideTour';

	for (i = 0; i < unFiltered.length; i++) {
		var divId = unFiltered[i].getAttribute('id');		
		if (divId == vendorid) {			
			unFiltered[i].className ='tshowTour';
		}
	}
	nonFormCSS();
}


function nonFormCSSArticle() {
	
	var copyHeight = document.getElementById("nonformcontents").offsetHeight;	
	var thxpage = document.getElementById("thankyoupagecopy");
	if(document.getElementById("thankyoupagecopymain") != null)
		thxpage = document.getElementById("thankyoupagecopymain");	
	if(thxpage != null && thxpage.offsetHeight > 200) copyHeight = thxpage.offsetHeight;

	if(document.getElementById("thankyoupagecopy1") != null ){

		if(document.getElementById("logoTable") != null){
			if(document.getElementById("extraV") != null){
				document.getElementById("thankyoupagecopy1").style.top=document.getElementById("logoTable").offsetHeight+280;
				document.getElementById("footertxt").style.top=copyHeight+765;
			}
			else{
				document.getElementById("thankyoupagecopy1").style.top=document.getElementById("logoTable").offsetHeight+80;			
				document.getElementById("footertxt").style.top=copyHeight+535;
			}
			document.getElementById("vendorseparator").style.top=document.getElementById("logoTable").offsetHeight+50;
		}
		if(document.getElementById("ffootertxt_sitemap") != null)
			document.getElementById("footertxt_sitemap").style.top=copyHeight+535;	
	}else{
		if(document.getElementById("footertxt") != null)
			document.getElementById("footertxt").style.top=copyHeight+245;
		if(document.getElementById("ffootertxt_sitemap") != null)
			document.getElementById("footertxt_sitemap").style.top=copyHeight+245;
	}
////////////////////////////////////	
	var totalHeight = 0;
	if(document.getElementById("extraV") != null ){
		totalHeight = document.getElementById("nonformpagecopy").offsetHeight+document.getElementById("extraV").offsetHeight+copyHeight-300;
		document.getElementById("rightbody").style.height = totalHeight-80;
	}
	else{
		totalHeight = document.getElementById("nonformpagecopy").offsetHeight+copyHeight;
		document.getElementById("rightbody").style.height = totalHeight;//+450;
	}

////////////////////////////////////		
	if(document.getElementById("thankyoupagecopymain") != null)
		totalHeight = document.getElementById("thankyoupagecopymain").offsetHeight-150;
	document.getElementById("container").style.height = totalHeight+220;
	document.getElementById("leftbody").style.height = totalHeight+220;
	
	if(document.getElementById("ctcExtraV") != null ){
		if (navigator.appVersion.indexOf("MSIE")!=-1)
			document.getElementById("ctcExtraV").style.top = document.getElementById("thankyoupagecopy").offsetHeight+220;
		else
			document.getElementById("ctcExtraV").style.top = document.getElementById("thankyoupagecopy").offsetHeight+180;
	}
}

