//<SCRIPT LANGUAGE=javascript>
//<!--
function showccart(){
	
	return false;
}
 var paypal; 
function fixcart(thisform) { 

 paypal = window.open('','paypal','width=600,height=400,scrollbars=1,resizable=1')

 paypal.navigate('about:blank');
 paypal.document.title='PayPal shopping cart';
 
 paypal.focus();
 
 if (event.srcElement.tagName=='A') {
		event.srcElement.target='paypal'
	}
		return true ;
}
 

function highlighterror(objname) {
if ( document.getElementById(objname) ) {
	document.getElementById(objname).focus();

	if ( document.getElementById(objname).isTextEdit == true ) {
		document.getElementById(objname).select();
	}
	// set this input items style to inperror
	document.getElementById(objname).className = 'inperror';
	
	
	// set this rows style to tblerror
	var trow = getthisrow(document.getElementById(objname))
	//trow.className  = 'tblrowerror'



}

}

 
function getthisrow(obj) {
var pe =  obj
while ( pe.tagName != 'TR' ) {
	pe = pe.parentElement;
}

return pe 
}

function getvalue() {
var me = event.srcElement;
return me.item(me.selectedIndex).value;
}
function myimage() {
var me = event.srcElement;
while (  me.tagName != "TABLE" ) me = me.parentElement;
for (var i=0; i < me.all.length-1; i++ ) 
if ( me.all(i).tagName=='IMG' ) var x = me.all(i);

return x ;

}
var imagearray = Array()
var imagearrayalt = Array()

var currimage=0;
function addrotateimage(src,show,alt) {

	var t = '' ;
	var x = imagearray.length;
	
	imagearray[x] = src;
	imagearrayalt[x] = alt;
	if (document.all('iirot')) {
		if (show==1){
 			document.all('iirot').src=src;
 			currimage=x
 		}
	}
	else
	{
		t = t + '<img src='+src+' style="cursor:hand" border=1 alt='+ imagearrayalt[x] +' id=iirot ><div id=iiron></div>'
		document.all('imagerot').innerHTML = t;
//un remark below to rotate image
 		document.all('iirot').attachEvent('onclick',shownextimage);
	}
document.all('iiron').innerHTML = 'Image '+(x+1)+' of '+(imagearray.length)

}
function shownextimage() {
	if (document.all('iirot') ) {
		currimage++
		 if ( currimage == imagearray.length  ) {currimage = 0} 
		document.all('iirot').alt=imagearrayalt[currimage];
		document.all('iirot').src=imagearray[currimage];
		document.all('iiron').innerHTML = 'Image '+(currimage+1)+' of '+(imagearray.length) + '<br><font size=-2>' + imagearrayalt[currimage] + '</font>';

	}

}
/*Auto center window script*/
var win = null;
 
function NewWindow(mypage,myname,w,h,scroll){
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings =
		'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
		win = window.open(mypage,myname,settings)
		//bring windows to the front
		win.focus();

}
function ImageWindow(mypage,myname,w,h,scroll){

		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings =
		'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=0,menubar=0,toolbars=0'
		win = window.open(mypage,myname,settings)
 		//bring windows to the front
		win.focus();

}
function GoodLogin() {
	if ( window.opener.document.location.href!=window.document.location.href)  {
		window.opener.document.location.href = window.document.location.href
		window.close()
	}else{
	}
	
}

function addfavdata(thislink) {
var r = window.document.body.innerText
var aqs = "&addTitle="+escape(window.document.title); //+"&addNotes="+escape(r);

if (thislink.href.substr(1,4) != 'java' )  {
		thislink.href = thislink.href + aqs;
}
return 

}

 

//-->
//</SCRIPT>

