// JavaScript Document
var MAC = ( navigator.appVersion.indexOf("Macintosh") != -1 )
var IE = ( navigator.appVersion.indexOf("MSIE") != -1 )

var disappeardelay=250  //tooltip disappear delay (in miliseconds)
var verticaloffset=0 //vertical offset of tooltip from anchor link, if any
var enablearrowhead=0 //0 or 1, to disable or enable the arrow image
var arrowheadimg=["template/images/arrowdown.gif", "template/images/arrowup.gif"] //path to down and up arrow images
var arrowheadheight=11 //height of arrow image (amount to reveal)

var ie=document.all
var ns6=document.getElementById&&!document.all
verticaloffset=(enablearrowhead)? verticaloffset+arrowheadheight : verticaloffset

var list; // global list variable cache
var tickerObj; // global tickerObj cache
var hex = 1;
var interval = 7; // interval in seconds
var fadeSpeed = 40; // fade speed, the lower the speed the faster the fade.  40 is normal.

var swidth=267;
var sheight=90;
var sspeed=5;
var restart=sspeed;
var rspeed=sspeed;
var spause=2000;

var tickerObject;
var listed;
var contenti = new Array();
var ii=0;

var ns6div = '';
var iediv = '';

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function returnFormAanbodZoeken() {
	document.returnForm.action = 'zelf-woning-kopen.php';
	document.returnForm.submit();	
}

function submitFormZoekprofielOpslaan() {
	document.returnForm.action = 'mijn-zoekprofiel.php';
	document.returnForm.submit();	
}

function submitFormAanbod() {
	document.returnForm.action = 'aanbod-woningen.php';
	document.returnForm.submit();	
}

function navigateRows(val, sort1, next_sort) {
	if (next_sort == 0) {
		if (document.sortForm.by.value == 'asc') {
			document.sortForm.by.value = 'desc';
		} else {
			document.sortForm.by.value = 'asc';
		}
	}
	document.sortForm.start.value = val;
	document.sortForm.order.value = sort1;
	document.sortForm.submit();
}

function changeCount(aantal) {	
	document.sortForm.aantal.value = aantal;
	document.sortForm.submit();
}

function openWindow(url, height, width, name, scrollbars) {
		var left = Math.floor( (screen.width - width) / 2);
		var top = Math.floor( (screen.height - height) / 2);   
		var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
		winParms += ",status=no,toolbar=no,menubar=no,location=no,scrollbars=" + scrollbars;   
		var win = window.open(url, name, winParms);
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
		return win;   
}
		

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function insertImage(maximaal) {	
	
	var i = document.huisForm.afb.value;
		i++;
	var newRow = document.getElementById("afbeeldingen").insertRow(-1);
	newTD1 = document.createElement("<td width=\"20%\">&nbsp;</td>");
	newTD2 = document.createElement("<td>&nbsp;</td>");
	
	newINPUT1 = document.createElement("<input name=\"afbeelding"+i+"\" type=\"file\" class=\"form\" style=\"width:70%\">");
	
	newTD1.innerText = "";     
	newTD2.appendChild(newINPUT1);
		
	newRow.appendChild(newTD1);
	newRow.appendChild(newTD2);
	
	document.huisForm.afb.value = i;
	
	if (i == maximaal) { 
		document.huisForm.afbeeldingtoevoegen.disabled = true;
	}
}	

function openAnders(object, table) {
	if (object.options[object.options.selectedIndex].value == 'anders') { 
		document.getElementById(table).style.display = 'block';
	} else {
		document.getElementById(table).style.display = 'none';
	}
}

function openZoekProfiel(object, table) {
	if (object.options[object.options.selectedIndex].text == 'Nederland') { 
		document.getElementById(table).style.display = 'block';
	} else {
		document.getElementById(table).style.display = 'none';
	}	
}

function openZoekProfielPlaats(object, table) {
	if (object.options[object.options.selectedIndex].value == '') { 
		document.getElementById(table).style.display = 'none';
	} else {
		document.getElementById(table).style.display = 'block';
	}	
}
 
function NaarRechts(oVan, oNaar, index1) {
	nMax = 5;
			
	oVan = document.getElementById(oVan);
	oNaar = document.getElementById(oNaar);
	index1 = document.getElementById(index1);
	
	if ( CheckTransaction(oVan, oNaar, nMax, true, index1) == false ) {
		alert('U heeft er al '+nMax+' geselecteerd...')
	}
}

function NaarLinks(oVan, oNaar, index, index1) {
	nMax = 10000
	
	oVan = document.getElementById(oVan);
	oNaar = document.getElementById(oNaar);
	index = document.getElementById(index);
	index1 = document.getElementById(index1);
	
	CheckTransaction(oNaar, oVan, nMax, false, index1);
}

function CheckTransaction(oVan, oNaar, nMax, bSelect, index1) {	
	var ii
	aSelected = new Array()
	for( ii=oVan.options.length-1; ii>-1; ii-- ) {
		if ( oVan.options[ii].selected == true ) {
			aSelected[aSelected.length] = ii
		}
	}
	if ( aSelected.length + oNaar.options.length <= nMax ) {		
		StartTransaction(oVan, oNaar, aSelected, bSelect, index1);
		return true
	} else {
		return false
	}
}

function StartTransaction(oVan, oNaar, aSelected, bSelect, index1) {
	var ii
	for( ii=0; ii<aSelected.length; ii++ ) {
		oOption = oVan.options[aSelected[ii]]
		if ( bSelect ) {
			index1.value += oOption.value + ';'
		} else {
			index1.value = index1.value.replace(';' + oOption.value + ';',';')
		}
		oNew = new Option(oOption.text, oOption.value)
		n = 0
		for(j=0;j<oNaar.options.length;j++) {
			if ( MakeCap(oNaar.options[j].text) < MakeCap(oOption.text) ) {
				n = j+1
			}
		}
		InsertOption(oNaar, oNew, n)
		oVan.options[aSelected[ii]] = null
		oNaar.selectedIndex = n
	}
}

function InsertOption(oNaar, oNew, nPlace) {
	oNaar.options.length ++
	var ii
	for( ii=oNaar.options.length-1; ii>nPlace; ii--) {
		oNaar.options[ii].text = oNaar.options[ii-1].text
		oNaar.options[ii].value = oNaar.options[ii-1].value
	}	
	oNaar.options[nPlace] = oNew
}

function MakeCap(s) {
	while ( s.indexOf('\'') > -1 ) {
		s = s.replace('\'','')
	}
	return s
}

function RemoveDouble(oVan, oNaar) {
	for ( i=0; i<oVan.options.length; i++ ) {
		for ( j=0; j<oNaar.options.length; j++ ) {
			if ( oVan.options[i].text == oNaar.options[j].text ) {
				oVan.options[i] = null
			}
		}
	}
}


function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function showhide(obj, e){
	dropmenuobj.style.left=dropmenuobj.style.top="-500px"
	if (e.type=="mouseover")
		obj.visibility="visible"
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
	if (whichedge=="rightedge"){
		edgeoffsetx=0
		var windowedge=ie && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
			edgeoffsetx=dropmenuobj.contentmeasure-obj.offsetWidth
		return edgeoffsetx
	} else {
		edgeoffsety=0
		var topedge=ie && !window.opera? iecompattest().scrollTop : window.pageYOffset
		var windowedge=ie && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) //move up?
			edgeoffsety=dropmenuobj.contentmeasure+obj.offsetHeight+(verticaloffset*2)
		return edgeoffsety
	}
}

function displayballoontip(obj, e){ //main ballooon tooltip function
	if (window.event) event.cancelBubble=true
		else if (e.stopPropagation) e.stopPropagation()
	if (typeof dropmenuobj!="undefined") //hide previous tooltip?
		dropmenuobj.style.visibility="hidden"
	clearhidemenu()
	//obj.onmouseout=delayhidemenu
	dropmenuobj=document.getElementById(obj.getAttribute("rel"))
	showhide(dropmenuobj.style, e)
	dropmenuobj.x=getposOffset(obj, "left")
	dropmenuobj.y=getposOffset(obj, "top")+verticaloffset
	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+15+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
	if (enablearrowhead)
		displaytiparrow()
}

function displaytiparrow(){ //function to display optional arrow image associated with tooltip
	tiparrow=document.getElementById("arrowhead")
	tiparrow.src=(edgeoffsety!=0)? arrowheadimg[0] : arrowheadimg[1]
	var ieshadowwidth=(dropmenuobj.filters && dropmenuobj.filters[0])? dropmenuobj.filters[0].Strength-1 : 0
	//modify "left" value depending on whether there's no room on right edge of browser to display it, respectively
	tiparrow.style.left=(edgeoffsetx!=0)? parseInt(dropmenuobj.style.left)+dropmenuobj.offsetWidth-tiparrow.offsetWidth-10+"px" : parseInt(dropmenuobj.style.left)+5+"px"
	//modify "top" value depending on whether there's no room on right edge of browser to display it, respectively
	tiparrow.style.top=(edgeoffsety!=0)? parseInt(dropmenuobj.style.top)+dropmenuobj.offsetHeight-tiparrow.offsetHeight-ieshadowwidth+arrowheadheight+"px" : parseInt(dropmenuobj.style.top)-arrowheadheight+"px"
	tiparrow.style.visibility="visible"
}

function delayhidemenu(){
	delayhide=setTimeout("dropmenuobj.style.visibility='hidden'; dropmenuobj.style.left=0; if (enablearrowhead) tiparrow.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
	if (typeof delayhide!="undefined")
		clearTimeout(delayhide)
}

function reltoelement(linkobj){ //tests if a link has "rel" defined and it's the ID of an element on page
	var relvalue=linkobj.getAttribute("rel")
	return (relvalue!=null && relvalue!="" && document.getElementById(relvalue)!=null && document.getElementById(relvalue).className=="balloonstyle")? true : false
}

function initalizetooltip(){
	var all_links=document.getElementsByTagName("a")
	if (enablearrowhead){
		tiparrow=document.createElement("img")
		tiparrow.setAttribute("src", arrowheadimg[0])
		tiparrow.setAttribute("id", "arrowhead")
		document.body.appendChild(tiparrow)
	}
	for (var i=0; i<all_links.length; i++){
		if (reltoelement(all_links[i])){ //if link has "rel" defined and it's the ID of an element on page
			all_links[i].onmouseover=function(e){
				var evtobj=window.event? window.event : e
				displayballoontip(this, evtobj)
			}
			all_links[i].onmouseout=delayhidemenu
		}
	}
}



function initialiseList(divId) {
	if (document.getElementById(divId)) { 
		tickerObj = document.getElementById(divId);
		list = tickerObj.childNodes;	
		for (var i=0; i<list.length; i++) {		
			var node = list[i];
			if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
				tickerObj.removeChild(node);
			}
		}
		if (list.length != 0) {
			run(divId, 0);
		}
	}
}

function run(divId, count) {
	//fadeText(divId);
	list[count].style.display = "block";
	if(count > 0) {
		list[count-1].style.display = "none";
	} else {
		list[list.length-1].style.display = "none";
	}
	count++;
	if(count == list.length) {
		count = 0;
	}
	window.setTimeout("run('" + divId + "', " + count+ ")", interval*1000);
}


function P7_Uberlink(cl,d){
	var i,ob,tA,h=document.location.href;
	if(document.getElementById){
	ob=(d)?document.getElementById(d):document;
	if(ob){
	tA=ob.getElementsByTagName('A');
	for(i=0;i<tA.length;i++){
	if(tA[i].href==h){
	tA[i].className=cl;
}}}}}


function goup() {
	if (sspeed!=rspeed*16) { 
		sspeed = sspeed * 2;
		restart = sspeed;
	}
}

function start(){
	
	if (document.getElementById('iens6div')) {
		tickerObject = document.getElementById('iens6div');
		listed = tickerObject.childNodes
		
		for (var i=0; i<listed.length; i++) {		
			var node = listed[i];
			if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
				tickerObject.removeChild(node);
			}
		}
	
		for (var i=0; i<listed.length; i++) {
			contenti[i] = '<li>'+listed[i].innerHTML+'</ul>';		
		}
		
		if (document.all) {
			iediv = iens6div;
			iediv.style.pixelTop = sheight;
			iediv.innerHTML = contenti[0];
			sizeup = iediv.offsetHeight;			
			iescroll();
		} else {		
			ns6div = document.getElementById('iens6div');
			ns6div.style.top = sheight;
			ns6div.innerHTML = contenti[0];
			sizeup = ns6div.offsetHeight;
			ns6scroll();
		} 
	}
	//closePageLoader();	
}

function iescroll(){
	
	if (iediv.style.pixelTop> 0 && iediv.style.pixelTop <= sspeed) {
		iediv.style.pixelTop=0;
		setTimeout("iescroll()",spause);
	} else if (iediv.style.pixelTop>=sizeup*-1) {
		iediv.style.pixelTop -= sspeed;
		setTimeout("iescroll()",100);
	} else {
		if (ii==contenti.length-1) {
			ii=0;
		} else { 
			ii++;
		}
		iediv.style.pixelTop = sheight;
		iediv.innerHTML = contenti[ii];
		sizeup = iediv.offsetHeight;
		iescroll();
	}
}

function ns6scroll() { 		
	
	var tp;
	
	if(ns6div.style.top > 0 && ns6div.style.top <= sspeed) {
		ns6div.style.top = 0 + 'px';
		setTimeout("ns6scroll()",spause);
	} else if(ns6div.style.top >= sizeup*-1) {
		top = ns6div.style.top - sspeed;
		ns6div.style.top = tp + 'px';
		setTimeout("ns6scroll()",100);
	} else { 
		if (ii==contenti.length-1) {
			ii=0;
		} else { 
			ii++;
		}
		ns6div.style.top = sheight + 'px';
		ns6div.innerHTML = contenti[ii];
		sizeup = ns6div.offsetHeight;
		ns6scroll();
	}
}

function closePageLoader() {
	document.getElementById('page_loader').style.display = "none";
	document.getElementById('page_loader_content').style.display = "none";	
}

function openPageLoader() {	
	document.getElementById('page_loader').style.display = "block";
	document.getElementById('page_loader_content').style.display = "block";	
	//alert('open page loader');
}

function changeBG(objRow, mouseState) {
    if (mouseState == 'on') {
            sColor = '#eeeeee';            
            //tColor = '#000000';
			//cursor = 'pointer';
    }
    else if (mouseState == 'off') {
            sColor = '#FFFFFF';
            //tColor = '#000000';
			//cursor = 'default';
    }
    objRow.bgColor = sColor;
    //objRow.style.color = tColor;
}

/* 

  ================================================
  PVII Horizontal Gallery scripts
  Copyright (c) 2006 Project Seven Development
  www.projectseven.com
  Version: 1.1.3
  ================================================
  
*/
var p7gsiem=(navigator.appVersion.indexOf("MSIE 5")>-1&&navigator.userAgent.indexOf("Mac")>-1)?true:false;
var p7gsca,p7gsa=new Array(),p7gsplot=new Array(),p7gstmb = new Array();
function P7_setHGS(){ //v1.1.0 by PVII-www.projectseven.com
 var i,d='',tA,h="<sty"+"le type=\"text/css\">";if(!document.getElementById){return;}
 tA=navigator.userAgent.toLowerCase();if(window.opera){
 if(tA.indexOf("opera 5")>-1 || tA.indexOf("opera 6")>-1){return;}}
 h+="#p7GS{visibility:hidden;}";h+="<"+"/sty"+"le>";document.write(h);
}
P7_setHGS();
function P7_HGSinit(){ //v1.1.0 by PVII-www.projectseven.com
 if (document.getElementById('p7GSvp')) {
 var i,x,s,vp,sc,ul,li,h,hh=0,w,ww=0,uw,n,nn,im,a,nv,hv,bh,bw,ed,eh,ew,cv,j,kw,tA;
 if(!document.getElementById){return;}tA=navigator.userAgent.toLowerCase();
 if(window.opera){if(tA.indexOf("opera 5")>-1 || tA.indexOf("opera 6")>-1){return;}}
 p7gsa=arguments;if(p7gsiem||tA.indexOf('scape6/6')>-1){p7gsa[1]=0;}vp=document.getElementById('p7GSvp');
 sc=document.getElementById('p7GSsc');li=sc.getElementsByTagName('LI');im=sc.getElementsByTagName('IMG'); 
 for(i=0;i<im.length;i++){im[i].style.display='block';}for(i=0;i<li.length;i++){
 li[i].style.position='absolute';h=li[i].offsetHeight;w=li[i].offsetWidth;hh=(h>hh)?h:hh;
 ww=(w>ww)?w:ww;}for(i=0;i<li.length;i++){li[i].style.height=hh+'px';li[i].style.width=ww+'px';}
 for(i=0;i<li.length;i++){h=li[i].offsetHeight;w=li[i].offsetWidth;if(h>hh){n=hh-(h-hh);
 li[i].style.height=n+'px';}if(w>ww){n=ww-(w-ww);li[i].style.width=n+'px';}}ul=sc.getElementsByTagName('UL');
 ww=0;for(i=0;i<ul.length;i++){li=ul[i].getElementsByTagName('LI');	kw=0;for(j=0;j<li.length;j++){
 w=li[j].offsetWidth;h=li[j].offsetHeight;li[j].style.left=kw+'px';kw+=w;ww=(kw>ww)?kw:ww;}
 ul[i].style.position='relative';ul[i].style.height=h+'px';}if(ul.length==1){
 document.getElementById('p7GSnv').style.display='none';}sc.style.position='absolute';sc.style.top='0px';
 sc.style.left='0px';vp.style.height=h+'px';vp.style.width=ww+'px';vp.style.overflow='hidden';
 if(p7gsa[0]==1){li=sc.getElementsByTagName('LI');for(i=0;i<li.length;i++){im=li[i].getElementsByTagName('IMG')[0];
 h=im.offsetHeight;w=im.offsetWidth;hh=parseInt(li[i].style.height);ww=parseInt(li[i].style.width);
 n=parseInt((hh-h)/2);nn=parseInt((ww-w)/2);if(n>0){im.style.marginTop=n+'px';}if(nn>0){
 im.style.marginLeft=nn+'px';}}}document.p7gspre=new Array();a=sc.getElementsByTagName('A');x=0;
 for(i=0;i<a.length;i++){if(a[i].parentNode.nodeName=='LI'){a[i].onmouseover=function(){P7_HGSover(this);};
 a[i].onfocus=function(){P7_HGSover(this);};a[i].onmouseout=function(){P7_HGSout(this);};
 a[i].onclick= function(){return P7_HGSshow(this);};document.p7gspre[x]=new Image();document.p7gspre[x].cmp=false;
 document.p7gspre[x].onload=function (){this.cmp=true;};a[i].p7gsindex=x;p7gstmb[x]=a[i];x++;}}
 nv=document.getElementById('p7GSnv');x=0;if(nv){hv=nv.innerHTML;ul=sc.getElementsByTagName('UL');
 for(i=0;i<ul.length;i++){s=(i==0)?'':' <span>|</span> ';x=i+1;
 hv+=s+'<a id="p7gsn'+x+'" href="javascript:;" title="View Thumbnail Panel '+x+'">'+x+'</a>';}
 nv.innerHTML=hv;a=nv.getElementsByTagName('A');for(i=0;i<a.length;i++){a[i].onclick= function(){
 return P7_HGSnvs(this);};}}document.getElementById('p7GS').style.visibility="visible";h=p7gsa[4];
 if(!P7_HGSurl()){if(h>0){P7_HGStrig(h-1,9);}}
 }
}
function P7_HGSover(a){ //v1.1.0 by PVII-www.projectseven.com
 var im=a.getElementsByTagName('IMG')[0];if(im.className!='p7GSon'){im.className='p7GSover';}
}
function P7_HGSout(a){ //v1.1.0 by PVII-www.projectseven.com
 var im=a.getElementsByTagName('IMG')[0];if(im.className!='p7GSon'){im.className='';}
}
function P7_HGSnvs(a,g){ //v1.1.0 by PVII-www.projectseven.com
 var i,p,ta;p=parseInt(a.id.replace('p7gsn',''));g=(g)?g:0;
 ta=document.getElementById('p7GSnv').getElementsByTagName('A');for(i=0;i<ta.length;i++){
 if(ta[i].className){ta[i].className='';}}a.className='p7GSnvon';P7_HGSmove(p,g);return false;
}
function P7_HGSmove(p,g){ //v1.1.0 by PVII-www.projectseven.com
 var i,h,sc,t,c,m;sc=document.getElementById('p7GSsc');h=sc.getElementsByTagName('LI')[0].offsetHeight;
 t=((h*p)-h)*-1;c=parseInt(sc.style.top);c=(c)?c:0;m=(c<t)?1:0;P7_HGSvon();if(p7gsa[5]==1&&g!=9&&g!=6){
 P7_HGSscr(t,m);}else{sc.style.top=t+'px';P7_HGSvoff();}
}
function P7_HGSvoff(){ //v1.1.0 by PVII-www.projectseven.com
 var i,j,ul,ta,m=false;ta=document.getElementById('p7GSnv').getElementsByTagName('A');
 for(i=0;i<ta.length;i++){if(ta[i].className=='p7GSnvon'){m=true;break;}}if(m){
 ul=document.getElementById('p7GSsc').getElementsByTagName('UL');for(j=0;j<ul.length;j++){
 if(j==i){ul[j].style.visibility='visible';}else{ul[j].style.visibility='hidden';}}}
}
function P7_HGSvon(){ //v1.1.0 by PVII-www.projectseven.com
 var i,ul=document.getElementById('p7GSsc').getElementsByTagName('UL');
 for(i=0;i<ul.length;i++){ul[i].style.visibility='visible';}
}
function P7_HGSscr(t,m){ //v1.1.0 by PVII-www.projectseven.com
 var d,r,y=30;d=document.getElementById('p7GSsc');c=parseInt(d.style.top);r=P7_HGSrate(c,t);
 c+=(m==1)?r:r*-1;if(m==1){c=(c>=t)?t:c;}else{c=(c<=t)?t:c;}d.style.top=c+"px";if(c!=t){
 d.p7hgsan=setTimeout("P7_HGSscr("+t+","+m+")",y);}else{P7_HGSvoff();}
}
function P7_HGSrate(c,t){ //v1.1.0 by PVII-www.projectseven.com
 var tt=Math.abs(t-c),i=parseInt(tt*.08);i=(i<=20)?20:i;return i;
}
function P7_HGStrig(n,ug){ //v1.1.0 by PVII-www.projectseven.com
 var i,sc,a,f;ug=(ug)?ug:0;a=p7gstmb[n];if(a){P7_HGStrigp(a,ug);f=P7_HGSshow(a,ug);}
}
function P7_HGStrigp(a,ug){ //v1.1.0 by PVII-www.projectseven.com
 var i,nv,ul,pp,f;nv=document.getElementById('p7GSnv').getElementsByTagName('A');
 ul=document.getElementById('p7GSsc').getElementsByTagName('UL');pp=a.parentNode;
 while(pp){if(pp.nodeName=='UL'){break;}pp=pp.parentNode;}for(i=0;i<ul.length;i++){
 if(ul[i]==pp){break;}}f=P7_HGSnvs(nv[i],ug);
}
function P7_HGSurl(){ //v1.1.0 by PVII-www.projectseven.com
 var i,h,s,x,m=false,p='pic';if(document.getElementById){h=document.location.search;if(h){
 h=h.replace('?','');s=h.split('=');if(s&&s.length){for(i=0;i<s.length;i+=2){if(s[i]==p){
 x=parseInt(s[i+1]);if(x){P7_HGStrig(x,9);m=true;break;}}}}}h=document.location.hash;
 if(h){x=parseInt(h.substring(1,h.length));if(x&&x>0){m=true;}}}if(m){x--;
 P7_HGStrig(x,9);}return m;
}
function P7_HGSshow(a,ug){ //v1.1.0 by PVII-www.projectseven.com
 var i,ti,im,fM,pM,dM,cM,dD,ds,h,w;ug=(ug)?ug:0;im=a.getElementsByTagName('IMG')[0];
 ti=document.getElementById('p7GSvp').getElementsByTagName('IMG');if(p7gsca){
 if(p7gsca==a){return false;}}for(i=0;i<ti.length;i++){ti[i].className='';}im.className='p7GSon';
 dM=document.getElementById('p7GSfs');fM=dM.getElementsByTagName('IMG')[0];
 pM=document.p7gspre[a.p7gsindex];if(document.p7gswait){clearTimeout(document.p7gswait);}
 p7gsca=a;if(!pM.cmp){P7_GSpbs(fM);pM.src=a.href;P7_GSwait(a.p7gsindex,ug);}else{
 P7_GSfin(pM,ug);}return false;
}
function P7_GSpbs(im,ug){ //v1.1.0 by PVII-www.projectseven.com
 var i,l,t,p,pb,pw,ph,ih,iw;pb=document.getElementById('p7GSpb');pw=pb.offsetWidth;
 ph=pb.offsetHeight;if(im){ih=(p7gsiem)?im.height:im.offsetHeight;
 iw=(p7gsiem)?im.width:im.offsetWidth;t=(ih-ph)/2;l=(iw-pw)/2;p=P7_getPos(im);l+=p[0];t+=p[1];
 pb.style.left=l+'px';pb.style.top=t+'px';pb.style.visibility="visible";}
}
function P7_getPos(im){ //v1.1.0 by PVII-www.projectseven.com
 var p,pp,l=0,t=0,r=new Array(2);pp=im;while(pp){l+=(pp.offsetLeft)?pp.offsetLeft:0;
 t+=(pp.offsetTop)?pp.offsetTop:0;if(window.opera||navigator.userAgent.indexOf("Safari")>-1){
 if(pp.nodeName=="BODY"){l-=(pp.offsetLeft)?pp.offsetLeft:0;t-=(pp.offsetTop)?pp.offsetTop:0;}}
 pp=pp.offsetParent;}if(p7gsiem){l+=parseInt(document.body.currentStyle.marginLeft);
 t+=parseInt(document.body.currentStyle.marginTop);}r[0]=l;r[1]=t;return r;
}
function P7_GSwait(ix,ug){ //v1.1.0 by PVII-www.projectseven.com
 var im=document.p7gspre[ix];if(im.cmp || (!document.all&&im.height>1)){im.cmp=true;
 document.getElementById('p7GSpb').style.visibility='hidden';P7_GSfin(im,ug);
 }else{document.p7gswait=setTimeout("P7_GSwait("+ix+","+ug+")",200);}
}
function P7_GSfin(im,ug){ //v1.1.0 by PVII-www.projectseven.com
 var dM,fM,cM,aL,cD,ds,tB,dT='',tH='',aC,fS,an,st='',h,h1,h2,ti,ci,ct,cn;
 var status=document.getElementById('status').value; 
 var arVersion = navigator.appVersion.split("MSIE")
 var version = parseFloat(arVersion[1])
 if ((version >= 5.5) && (document.body.filters)) {
 if (version == 5.5) { var margin = "margin-top:-126px;"; } else { var margin = "margin-top:-128px;"; } 
 var imgID = " id='status_woning' ";
 var imgClass = " class='" + status + "' "
 var imgStyle = "display:inline-block;"
 var image = "<span "+imgID+imgClass+" style=\""+margin+" width:90px; height:123px;"+imgStyle+" "
 +"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
 +"(src=\'/template/images/"+status+".png\',sizingMethod='scale');\"></span>";
 } else {
 var image = "<div id=\"status_woning\" class="+status+"><img src=\"/template/images/"+status+".png\" width=\"90\" height=\"123\"></div>";	 
 }
 an=p7gsa[1];if(an>0){
 st=' style="visibility:hidden"';}fS=document.getElementById('p7GSfs');dM=document.getElementById('p7GSfs');
 fM=dM.getElementsByTagName('IMG')[0];tB=p7gsca.getElementsByTagName('IMG')[0];
 tH+='<table class="p7GSfst" align="center" cellpadding="0" cellspacing="0">';
 aL=tB.getAttribute("alt");ci=P7GSgi();ci[4]+=1;ct=p7gstmb.length;cn='';if(p7gsa[7]==1){
 cn=' <span class="p7GScounter">('+ci[4]+' of '+ct+')</span>';}aC='<tr><td class="p7GSfsc"><p>'+aL+cn+'</p></td></tr>';
 ds=p7gsca.parentNode.getElementsByTagName('DIV');if(ds&&ds[0]){dT=ds[0].innerHTML;}if(p7gsa[2]==1){
 if(aL&&aL.length>0){tH+=aC;}}tH+='<tr><td class="p7GSfsi"><img src="'+im.src+'" alt="'+aL+'"'+st+'>'+image+'</td></tr>';
 if(p7gsa[2]==2){if(aL&&aL.length>0){tH+=aC;}}if(p7gsa[3]==1){if(dT.length>0){
 tH+='<tr><td class="p7GSfsd"><div>'+dT+'</div></td></tr>';}}tH+='</table>';dM.innerHTML=tH;
 if(fS){fS.style.display='block';}if(ug<7){if(an==1||an==2){P7_GSfan();}else if(an>2){P7_GSfie();}
 }else{document.getElementById('p7GSfs').getElementsByTagName('IMG')[0].style.visibility='visible';}
}
function P7GSgi(){ //v1.1.0 by PVII-www.projectseven.com
 var i,x,a,gi=new Array();x=p7gstmb.length-1;for(i=0;i<p7gstmb.length;i++){
 if(p7gstmb[i]==p7gsca){break;}}gi[0]=0;gi[1]=(i>0)?i-1:0;gi[2]=(i<x)?i+1:x;gi[3]=x;gi[4]=i;return gi;
}
function P7_GSfie(){ //v1.1.0 by PVII-www.projectseven.com
 var i,d,im,f,ff,pim,g=new Array(),an=p7gsa[1];
 im=document.getElementById('p7GSfs').getElementsByTagName('IMG')[0];pim=im.parentNode;
 if(!im.parentNode.filters){p7gsa[1]=1;P7_GSfan();return;}f='progid:DXImageTransform.Microsoft.';
 d=' Duration=1';g[0]='Fade';g[1]='Fade';g[2]='Fade';g[3]='Fade';
g[4]='Iris(irisstyle="SQUARE", motion="in"'+d+')';g[5]='Iris(irisstyle="SQUARE", motion="out"'+d+')';
g[6]='Iris(irisstyle="CIRCLE", motion="in"'+d+')';g[7]='Iris(irisstyle="CIRCLE", motion="out"'+d+')';
g[8]='Blinds(direction="up", bands=1'+d+')';g[9]='Blinds(direction="down", bands=1'+d+')';
g[10]='Blinds(direction="right", bands=1'+d+')';g[11]='Blinds(direction="left", bands=1'+d+')';
g[12]='Blinds(direction="right"'+d+')';g[13]='Blinds(direction="down"'+d+')';
g[14]='CheckerBoard(direction="right"'+d+')';g[15]='CheckerBoard(direction="down"'+d+')';
g[16]='RandomDissolve('+d+')';g[17]='Barn(orientation="vertical", motion="in"'+d+')';
g[18]='Barn(orientation="vertical", motion="out"'+d+')';g[19]='Barn(orientation="horizontal", motion="in"'+d+')'
g[20]='Barn(orientation="horizontal", motion="out"'+d+')';g[21]='Strips(motion="leftdown"'+d+')';
g[22]='Strips(motion="leftup"'+d+')';g[23]='Strips(motion="rightdown"'+d+')';
g[24]='Strips(motion="rightup"'+d+')';g[25]='RandomBars(orientation="horizontal"'+d+')';
g[26]='RandomBars(orientation="vertical"'+d+')';g[27]='Wipe(GradientSize=1.0, wipeStyle=0, motion="forward"'+d+')';
g[28]='Inset()';g[29]='Pixelate(MaxSquare=50,Duration=1,Enabled=false'+d+')';
g[30]='RadialWipe(wipeStyle="clock"'+d+')';g[31]='RadialWipe(wipeStyle="wedge"'+d+')';
g[32]='RadialWipe(wipeStyle="radial"'+d+')';g[33]='Slide(slideStyle="PUSH", bands=1'+d+')';
g[34]='Slide(slideStyle="SWAP", bands=5'+d+')';g[35]='Slide(slideStyle="HIDE", bands=2'+d+')';
g[36]='Spiral(GridSizeX=16, GridSizeY=16'+d+')';g[37]='Stretch(stretchStyle="hide"'+d+')';
g[38]='Stretch(stretchStyle="spin"'+d+')';g[39]='Stretch(stretchStyle="push"'+d+')';
g[40]='Wheel(spokes=4'+d+')';g[41]='Wheel(spokes=16'+d+')';g[42]='zigzag(GridSizeX=8, GridSizeY=8'+d+')';
 an=(an>g.length)?3:an;f+=g[an];pim.style.filter=f;if(pim.filters.length<1){p7gsa[1]=1;P7_GSfan();
 return;}pim.filters[0].Apply();im.style.visibility='visible';pim.filters[0].Play();
}
function P7_GSfan(){ //v1.1.0 by PVII-www.projectseven.com
 var im,fh,fw,tB,tF,tL,l,t,dt,dl,df,fr,dn,pl,an,c=10,i,ih,iw,ih2,iw2,l2,t2,lm=false,tm=false,ch=c,cw=c;
 an=p7gsa[1];im=document.getElementById('p7GSfs').getElementsByTagName('IMG')[0];tF=P7_getPos(im);
 fh=im.offsetHeight;fw=im.offsetWidth;tB=p7gsca.getElementsByTagName('IMG')[0];tD=P7_getPos(tB);
 if(an==1){l=parseInt((tB.offsetWidth/2))-5+tD[0];t=parseInt((tB.offsetHeight/2))-5+tD[1];
 }else{l=parseInt((fw/2))-5+tF[0];t=parseInt((fh/2))-5+tF[1];}tL=document.getElementById('p7GSah');
 tL.innerHTML='<img src="'+im.src+'" height="'+c+'" width="'+c+'">';tL.style.left=l+'px';tL.style.top=t+'px';
 dt=tF[1]-t;dl=tF[0]-l;fr=20;p7gsplot.length=0;ih=fh-c;iw=fw-c;if(ih>iw){dn=parseInt(ih/fr)+1;ih2=fr;
 iw2=parseInt(iw/dn)+1;}else{dn=parseInt(iw/fr)+1;iw2=fr;ih2=parseInt(ih/dn)+1;}l2=parseInt( Math.abs(dl)/dn)+1;
 if(dl<0){l2=l2*-1;lm=true;}t2=parseInt( Math.abs(dt)/dn)+1;if(dt<0){t2=t2*-1;tm=true;}for(i=1;i<dn+1;i++){
 t+=t2;if(tm){t=(t<=tF[1])?tF[1]:t;}else{t=(t>=tF[1])?tF[1]:t;}l+=l2;if(lm){l=(l<=tF[0])?tF[0]:l;}else{
 l=(l>=tF[0])?tF[0]:l;}cw+=iw2;cw=(cw>=fw)?fw:cw;ch+=ih2;ch=(ch>=fh)?fh:ch;
 p7gsplot[i-1]=t+','+l+','+cw+','+ch;}tL.style.visibility="visible";P7_GSfanim(0);
}
function P7_GSfanim(p){ //v1.1.0 by PVII-www.projectseven.com
 var i,pl,dy=10,tL=document.getElementById('p7GSah'),im=tL.getElementsByTagName('IMG')[0];
 if(p<p7gsplot.length){pl=p7gsplot[p].split(',');tL.style.top=pl[0]+'px';tL.style.left=pl[1]+'px';
 im.style.width=pl[2]+'px';im.style.height=pl[3]+'px';p++;setTimeout("P7_GSfanim("+p+")",dy);}
 else{document.getElementById('p7GSfs').getElementsByTagName('IMG')[0].style.visibility='visible';
 tL.style.visibility='hidden';}
}
function P7GSgi(){ //v1.1.0 by PVII-www.projectseven.com
var i,x,a,gi=new Array();x=p7gstmb.length-1;for(i=0;i<p7gstmb.length;i++){
if(p7gstmb[i]==p7gsca){break;}}gi[0]=0;gi[1]=(i>0)?i-1:0;gi[2]=(i<x)?i+1:0;gi[3]=x;gi[4]=i;return gi;
}

var p7AB=false;
var p7ABi=false;
function P7_setAB(){ //v1.0.3 by PVII-www.projectseven.com
 if(!document.getElementById){return;}var h,tA=navigator.userAgent.toLowerCase();
 if(window.opera){if(tA.indexOf("opera 5")>-1||tA.indexOf("opera 6")>-1){return;}}
 h=String.fromCharCode(60,115,116,121,108,101,32,116,121,112,101,61,34,116,101,120,116,47,99,115,115,34,62,46,112,55,65,66,99,111,110,116,101,110,116,123,100,105,115,112,108,97,121,58,110,111,110,101,59,125,60,47,115,116,121,108,101,62);
 h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,55,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,32,100,105,118,123,122,111,111,109,58,49,48,48,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);
 h+='\n'+String.fromCharCode(60,33,45,45,91,105,102,32,108,116,101,32,73,69,32,54,93,62,60,115,116,121,108,101,62,46,112,55,65,66,44,46,112,55,65,66,99,111,110,116,101,110,116,44,46,112,55,65,66,116,114,105,103,32,97,123,104,101,105,103,104,116,58,49,37,59,125,60,47,115,116,121,108,101,62,60,33,91,101,110,100,105,102,93,45,45,62);
 document.write(h);
}
P7_setAB();
function P7_opAB(){ //v1.0.3 by PVII-www.projectseven.com
 var x,c,tC,ab,tB;if(document.getElementById){ab='p7ABW'+arguments[0];tB=document.getElementById(ab);
 tB.p7Aba=arguments;x=arguments[3];if(x>0&&x<11){c='p7ABc'+arguments[0]+'_'+x;
 tC=document.getElementById(c);if(tC){tC.style.display='block';}}if(!p7ABi){p7ABi=true;
 if(window.addEventListener){window.addEventListener("load",P7_initAB,false);}
 else if(document.addEventListener){document.addEventListener("load",P7_initAB,false);}
 else if(window.attachEvent){window.attachEvent("onload",P7_initAB);}
 else if(typeof window.onload=='function'){var p7loadit=onload;window.onload=function(){
 p7loadit();P7_initAB();};}else{window.onload=P7_initAB;}}}
}
function P7_initAB(){ //v1.0.3 by PVII-www.projectseven.com
 var i,j,ab,tB,tD,tA,op,ob,tg;if(!document.getElementById){return;}
 for(i=10;i>0;i--){ab='p7ABW'+i;tB=document.getElementById(ab);if(tB){tA=tB.getElementsByTagName("A");
 tg='p7ABt'+i;for(j=0;j<tA.length;j++){if(tA[j].id && tA[j].id.indexOf(tg)==0){tA[j].onclick=function(){
 return P7_ABtrig(this);};tA[j].p7ABstate=0;tA[j].p7ABpr=ab;}}ob=i+'_'+tB.p7Aba[3];P7_ABopen(ob);}}
 p7AB=true;P7_ABurl();
}
function P7_ABopen(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,g,d='p7ABt'+s;a=document.getElementById(d);g=s.split("_");
 if(g&&g.length>1&&g[1]==99){a=P7_randAB(g[0]);}
 if(g&&g.length>1&&g[1]=='a'){P7_ABall(s);
 }else{if(a&&a.p7ABpr){if(a.p7ABstate==0){P7_ABtrig(a);}}}
}
function P7_ABclose(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,d='p7ABt'+s;a=document.getElementById(d);
 if(a&&a.p7ABpr){if(a.p7ABstate==1){P7_ABtrig(a);}}
}
function P7_ABclick(s){ //v1.0.3 by PVII-www.projectseven.com
 var a,d='p7ABt'+s;a=document.getElementById(d);if(a&&a.p7ABpr){P7_ABtrig(a);}
}
function P7_randAB(r){ //v1.0.3 by PVII-www.projectseven.com
 var i,k,j=0,d,dd,tA,a,rD=new Array();dd='p7ABW'+r;d=document.getElementById(dd);
 if(d){tA=d.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].p7ABpr&&tA[i].p7ABpr==dd){
 rD[j]=tA[i].id;j++;}}if(j>0){k=Math.floor(Math.random()*j);a=document.getElementById(rD[k]);}}return a;
}
function P7_ABall(s){ //v1.0.3 by PVII-www.projectseven.com
 var i,m,d,dd,st,et,tA,g=s.split("_");if(g&&g.length==2){st=parseInt(g[0]);
 if(st){et=st+1;}else{st=1;et=11;}m=p7AB;p7AB=false;for(i=st;i<et;i++){dd='p7ABW'+i;
 d=document.getElementById(dd);if(d){tA=d.getElementsByTagName("A");for(j=0;j<tA.length;j++){
 if(tA[j].p7ABpr && tA[j].p7ABpr==dd){if(g[1]=='a'&&tA[j].p7ABstate==0){P7_ABtrig(tA[j]);}
 else if(g[1]=='c'&&tA[j].p7ABstate==1){P7_ABtrig(tA[j]);}}}}}p7AB=m;}
}
function P7_ABurl(){ //v1.0.3 by PVII-www.projectseven.com
 var i,h,s,x,d='pab';if(document.getElementById){h=document.location.search;
 if(h){h=h.replace('?','');s=h.split(/[=&]/g);if(s&&s.length){
 for(i=0;i<s.length;i+=2){if(s[i]==d){x=s[i+1];if(x){P7_ABopen(x);}}}}}
 h=document.location.hash;if(h){x=h.substring(1,h.length);
 if(x && x.indexOf("pab")==0){P7_ABopen(x.substring(3));}}}
}
function P7_ABtrig(a){ //v1.0.3 by PVII-www.projectseven.com
 var i,j=null,op,pD,ad,aT,m=true,cp='p7ABc'+a.p7ABpr.substring(a.p7ABpr.length-1);
 var iD=a.id.replace('t','c'),tD=document.getElementById(iD);
 if(tD){m=false;pD=document.getElementById(a.p7ABpr);op=pD.p7Aba;
 if(op[4]==1&&op[1]==1&&a.p7ABstate==1){return m;}tD=pD.getElementsByTagName("DIV");
 for(i=0;i<tD.length;i++){if(tD[i].id&&tD[i].id.indexOf(cp)>-1){if(tD[i].id==iD){j=i;
 if( a.className=="p7ABtrig_down"){a.p7ABstate=0;a.className='';P7_ABhide(tD[j],op);
 }else{a.p7ABstate=1;a.className="p7ABtrig_down";P7_ABshow(tD[j],op);}
 }else{if(op[1]==1){ad=tD[i].id.replace('c','t');aT=document.getElementById(ad);
 aT.className='';aT.p7ABstate=0;P7_ABhide(tD[i],op);}}}}}P7_checkEQH();return m;
}
function P7_checkEQH(){ //v1.0.3 by PVII-www.projectseven.com
 if(typeof(P7_colH2)=='function'){P7_colH2();}if(typeof(P7_colH)=='function'){P7_colH();}
}
function P7_ABshow(d,op){ //v1.0.3 by PVII-www.projectseven.com
 var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
 if(p7AB&&op[2]==3){d.style.display='block';P7_ABfadeIn(d.id,0);}
 else if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");
 wP=document.getElementById(wd);if(P7_hasOverflow(d)||P7_hasOverflow(wP)){
 d.style.display='block';return;}wP.style.overflow="hidden";wP.style.height="1px";
 d.style.display='block';h=d.offsetHeight;P7_ABglide(wd,1,h,op[2]);}else{d.style.display='block';}
}
function P7_ABhide(d,op){ //v1.0.3 by PVII-www.projectseven.com
 var h,wd,wP,isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);
 if((p7AB&&op[2]==1||p7AB&&op[2]==2)&&!isIE5){wd=d.id.replace("c","w");
 wP=document.getElementById(wd);if(d.style.display!="none"){
 if(P7_hasOverflow(d)||P7_hasOverflow(wP)){d.style.display='none';return;}
 h=wP.offsetHeight;wP.style.overflow="hidden";P7_ABglide(wd,h,0,op[2]);}
 }else{d.style.display='none';}
}
function P7_hasOverflow(ob){ //v1.0.3 by PVII-www.projectseven.com
 var s,m;s=ob.style.overflow;if(!s){if(ob.currentStyle){s=ob.currentStyle.overflow;
 }else if(document.defaultView.getComputedStyle(ob,"")){
 s=document.defaultView.getComputedStyle(ob,"").getPropertyValue("overflow");}}
 m=(s&&s=='auto')?true:false;return m;
}
function P7_ABfadeIn(id,op){ //v1.0.3 by PVII-www.projectseven.com
 var d=document.getElementById(id);op+=.05;op=(op>=1)?1:op;
 if((navigator.appVersion.indexOf("MSIE")>-1)){d.style.filter='alpha(opacity='+op*100+')';
 }else{d.style.opacity=op;}if(op<1){setTimeout("P7_ABfadeIn('"+id+"',"+op+")",40);}
}
function P7_ABglide(dd,ch,th,p){ //v1.0.3 by PVII-www.projectseven.com
 var w,m,d,wd,wC,tt,dy=10,inc=10,pc=.15;
 d=document.getElementById(dd);m=(ch<=th)?0:1;
 if(p==1){tt=Math.abs(parseInt(Math.abs(th)-Math.abs(ch)));inc=(tt*pc<1)?1:tt*pc;}
 inc=(m==1)?inc*-1:inc;d.style.height=ch+"px";if(ch==th){if(th==0){
 wd=d.id.replace("w","c");wC=document.getElementById(wd);wC.style.display="none";d.style.height="auto";
 }else{d.style.height="auto";}P7_checkEQH();}else{ch+=inc;if(m==0){ch=(ch>=th)?th:ch;
 }else{ch=(ch<=th)?th:ch;}if(d.p7abG){clearTimeout(d.p7abG);}
 d.p7abG=setTimeout("P7_ABglide('"+dd+"',"+ch+","+th+","+p+")",dy);}
}

function goToURL(url) {
	if (url != '') { 
		window.location.href = url;
	}
}

if (window.addEventListener)
window.addEventListener("load", initalizetooltip, false)
else if (window.attachEvent)
window.attachEvent("onload", initalizetooltip)
else if (document.getElementById)
window.onload=initalizetooltip

