//general
function anyv(type,menu){if(type==1){if(navigator.appName=="Netscape"){for(i=1;i<=5;i++){mymenu=eval("document.getElementById('menu' + i)");mymenu.style.display="none"}};mymenu=eval("document.getElementById(menu)");mymenu.style.display="block";}
else{mymenu=eval("document.getElementById(menu)");mymenu.style.display="none";}
return true;}
function initMenuv(){document.getElementById('menu1_link').innerHTML='<a href="#">WebsiteTemplates.bz</a>';document.getElementById('menu2_link').innerHTML='<a href="http://www.websitetemplates.bz/partners.html"  >TemplatesBoxes.com</a>';document.getElementById('menu3_link').innerHTML='<a href="http://www.websitetemplates.bz/partners.html"  >CreativeDesignStudio.biz</a>';document.getElementById('menu4_link').innerHTML='<a href="http://www.websitetemplates.bz/support.html" >Help</a>';document.getElementById('menu5_link').innerHTML='<a href="http://www.websitetemplates.bz/support.html">Tutorials</a>';for(i=1;i<=5;i++)
{mymenu=eval("document.getElementById('menu' + i)");mymenu.style.display='none';}}
function SetFocus(TargetFormName){var target=0;if(TargetFormName!=""){for(i=0;i<document.forms.length;i++){if(document.forms[i].name==TargetFormName){target=i;break;}}}
var TargetForm=document.forms[target];for(i=0;i<TargetForm.length;i++){if((TargetForm.elements[i].type!="image")&&(TargetForm.elements[i].type!="hidden")&&(TargetForm.elements[i].type!="reset")&&(TargetForm.elements[i].type!="submit")){TargetForm.elements[i].focus();if((TargetForm.elements[i].type=="text")||(TargetForm.elements[i].type=="password")){TargetForm.elements[i].select();}
break;}}}
function RemoveFormatString(TargetElement,FormatString){if(TargetElement.value==FormatString){TargetElement.value="";}
TargetElement.select();}
function CheckDateRange(from,to){if(Date.parse(from.value)<=Date.parse(to.value)){return true;}else{return false;}}
function IsValidDate(DateToCheck,FormatString){var strDateToCheck;var strDateToCheckArray;var strFormatArray;var strFormatString;var strDay;var strMonth;var strYear;var intday;var intMonth;var intYear;var intDateSeparatorIdx=-1;var intFormatSeparatorIdx=-1;var strSeparatorArray=new Array("-"," ","/",".");var strMonthArray=new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");var intDaysArray=new Array(31,28,31,30,31,30,31,31,30,31,30,31);strDateToCheck=DateToCheck.toLowerCase();strFormatString=FormatString.toLowerCase();if(strDateToCheck.length!=strFormatString.length){return false;}
for(i=0;i<strSeparatorArray.length;i++){if(strFormatString.indexOf(strSeparatorArray[i])!=-1){intFormatSeparatorIdx=i;break;}}
for(i=0;i<strSeparatorArray.length;i++){if(strDateToCheck.indexOf(strSeparatorArray[i])!=-1){intDateSeparatorIdx=i;break;}}
if(intDateSeparatorIdx!=intFormatSeparatorIdx){return false;}
if(intDateSeparatorIdx!=-1){strFormatArray=strFormatString.split(strSeparatorArray[intFormatSeparatorIdx]);if(strFormatArray.length!=3){return false;}
strDateToCheckArray=strDateToCheck.split(strSeparatorArray[intDateSeparatorIdx]);if(strDateToCheckArray.length!=3){return false;}
for(i=0;i<strFormatArray.length;i++){if(strFormatArray[i]=='mm'||strFormatArray[i]=='mmm'){strMonth=strDateToCheckArray[i];}
if(strFormatArray[i]=='dd'){strDay=strDateToCheckArray[i];}
if(strFormatArray[i]=='yyyy'){strYear=strDateToCheckArray[i];}}}else{if(FormatString.length>7){if(strFormatString.indexOf('mmm')==-1){strMonth=strDateToCheck.substring(strFormatString.indexOf('mm'),2);}else{strMonth=strDateToCheck.substring(strFormatString.indexOf('mmm'),3);}
strDay=strDateToCheck.substring(strFormatString.indexOf('dd'),2);strYear=strDateToCheck.substring(strFormatString.indexOf('yyyy'),2);}else{return false;}}
if(strYear.length!=4){return false;}
intday=parseInt(strDay,10);if(isNaN(intday)){return false;}
if(intday<1){return false;}
intMonth=parseInt(strMonth,10);if(isNaN(intMonth)){for(i=0;i<strMonthArray.length;i++){if(strMonth==strMonthArray[i]){intMonth=i+1;break;}}
if(isNaN(intMonth)){return false;}}
if(intMonth>12||intMonth<1){return false;}
intYear=parseInt(strYear,10);if(isNaN(intYear)){return false;}
if(IsLeapYear(intYear)==true){intDaysArray[1]=29;}
if(intday>intDaysArray[intMonth-1]){return false;}
return true;}
function IsLeapYear(intYear){if(intYear%100==0){if(intYear%400==0){return true;}}else{if((intYear%4)==0){return true;}}
return false;}
//eof general
//tooltips
var d = document;var offsetfromcursorY=8;var ie=d.all && !window.opera;var ns6=d.getElementById && !d.all;var tipobj,op;
function tooltip(el,ptype) {if(ptype == 1) txt = "Purchasing the template at websitetemplates.bz customer has the right to use and customise it. Customer has no right to resale and re-change the templates after it has been sold and customised with the aim it was bought. For using the template in other projects customer should get an additional license.";else if(ptype == 2) txt = "<b>What is a Unique price?</b><br />Purchasing the template for a Unique price allows customer to use the template in several projects. Also, Unique price allows to re-sale the template and use it for commercial purpose. Having been purchased, the template is removed from sell immediately, and right on usage is passed into the customer. To learn more detailed information please contact support@websitetemplates.bz.";
	tipobj=d.getElementById('mess');tipobj.innerHTML = txt;op = 0.1;tipobj.style.opacity = op;tipobj.style.visibility="visible";el.onmousemove=positiontip;appear();}
function hide_info(el) {d.getElementById('mess').style.visibility='hidden';el.onmousemove='';}
function ietruebody(){return (d.compatMode && d.compatMode!="BackCompat")? d.documentElement : d.body}
function positiontip(e) {var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;var winwidth=ie? ietruebody().clientWidth : window.innerWidth-20;var winheight=ie? ietruebody().clientHeight : window.innerHeight-20;var rightedge=ie? winwidth-event.clientX : winwidth-e.clientX;var bottomedge=ie? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY;
if (rightedge < tipobj.offsetWidth)	tipobj.style.left=curX-tipobj.offsetWidth+"px";else tipobj.style.left=curX +"px";if (bottomedge < tipobj.offsetHeight) tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px";else tipobj.style.top=curY+offsetfromcursorY+"px";}
function appear() {if(op < 1) {op += 0.1;tipobj.style.opacity = op;tipobj.style.filter = 'alpha(opacity='+op*100+')';t = setTimeout('appear()', 30);}}
//eof tooltips
//search
var xmlHttp = false;/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/
var cur_id = 'colum_right_main';if (!xmlHttp && typeof XMLHttpRequest != 'undefined') { xmlHttp = new XMLHttpRequest();}
function get_search_small(id) {cur_id = id;url = "get_search.php";xmlHttp.open("GET", url, true);	xmlHttp.onreadystatechange = set_search_small;  xmlHttp.send(null);}
function set_search_small(){if(xmlHttp.readyState == 4){var response = xmlHttp.responseText;document.getElementById(cur_id).innerHTML = response + document.getElementById(cur_id).innerHTML;}}
//eof search
//preview_template
function mousePageXY(e){var x=0,y=0;if(!e)e=window.event;if(e.pageX||e.pageY){x=e.pageX;y=e.pageY;}else if(e.clientX||e.clientY){x=e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;y=e.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop;}
return{"x":x,"y":y};}
function get_xy(id,element_id){id.onmousemove=function(e){var elem=document.getElementById(element_id);var w=elem.offsetWidth;var h=elem.offsetHeight;var mCur=mousePageXY(e);if(mCur.y<h){elem.style.top=(mCur.y-5)+'px';}else{elem.style.top=(mCur.y-h+15)+'px';}
if(mCur.x<w){elem.style.left=(mCur.x-5)+'px';}else{elem.style.left=(mCur.x-w+25)+'px';}}}
function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function get_xy2(id,element_id,h,w,z){id.onmousemove=function(e){var elem=document.getElementById(element_id);var cur=mousePageXY(e);var w_h=iecompattest().scrollTop;var d=cur.y-w_h-h
if(d<0)d=0;elem.style.top=(w_h+d+5)+'px';if((cur.x-50)<w){elem.style.left=(cur.x+20)+'px';}else{elem.style.left=(cur.x-w-50)+'px';}}
return true;}
function show(id,img,title,wt,ht){var element_id='div_pre';if(get_xy2(id,element_id,ht,wt)){document.getElementById(element_id).style.height=ht+'px';document.getElementById(element_id).style.width=wt+'px';document.getElementById(element_id).style.display='';document.getElementById('img_pre').src=img;document.getElementById('text_pre').innerHTML=title;}}
function hide(){document.getElementById('img_pre').src='pic/none.gif';document.getElementById('div_pre').style.display='none';document.getElementById('img_pre').style.visibility="hidden"}
function make_pr(){document.write('<div style="position: absolute; z-index:2000; display: none;" id="div_pre"><h2 id="text_pre">&nbsp;</h2><img src="pic/none.gif" border="0" id="img_pre" onload="loading()" /></div>');}
function loading(){document.getElementById('img_pre').style.visibility="visible"}
//eof preview_template