//pre-load images
var load1=new Image();	
load1.src="images/circleOff.gif";
var load2=new Image();
load2.src="images/circleOn.gif";

var load3=new Image();	
load3.src="images/menuSideR_Off.gif";
var load4=new Image();
load4.src="images/menuSideR_On.gif";

var load5=new Image();	
load5.src="images/menuSideG_Off.gif";
var load6=new Image();
load6.src="images/menuSideG_On.gif";

var load7=new Image();	
load7.src="images/circleSideOff.gif";
var load8=new Image();
load8.src="images/circleSideOn.gif";

// menu up circle on
function menuUpOn (tdID)
{
	document.getElementById(tdID).style.color = '#8E0701';
}
// menu up circle off
function menuUpOff (tdID)
{
	document.getElementById(tdID).style.color = '#000000';
}


// menu side on
function menuSideOn (img)
{
	document.getElementById(img).src = load4.src;
}

// menu side off
function menuSideOff (img)
{
	document.getElementById(img).src = load3.src;
}


// menu category circle on
function menuCatOn (img)
{
	document.getElementById(img).src = load8.src;
}
// menu category circle off
function menuCatOff (img)
{
	document.getElementById(img).src = load7.src;
}
function openPopupWindow(sURL, iWidth, iHeight, scroll, retValue, isFullScreen, isResizable)
{		
	var curAvailWidth = screen.availWidth;
	var curAvailHeight = screen.availHeight; 
	var sFeatures = "";
	if(isFullScreen)
	{
		sFeatures += 'width=' + (curAvailWidth - 10);
		sFeatures += ',height=' + (curAvailHeight - 10);
		sFeatures += ',top=0';
		sFeatures += ',left=0';
	}	
	else
	{
		sFeatures += 'width=' + iWidth;
		sFeatures += ',height=' + iHeight;
		sFeatures += ',top=' + (curAvailHeight-iHeight)/2;
		sFeatures += ',left=' + (curAvailWidth-iWidth)/2;
	}
	if (scroll == 1)
		sFeatures += ',scrollbars=1';
	else
		sFeatures += ',scrollbars=0';
	sFeatures += ',center=yes';
	if (isResizable)
		sFeatures += ',resizable=yes'; 
	else
		sFeatures += ',resizable=no';
	sFeatures += ',status=no';
	sFeatures += ',history=no';
	sFeatures += ',toolbar=no';
	sFeatures += ',menubar=no';
	sFeatures += ',location=no';
			
	var oWindow = window.open('', '_blank', sFeatures);
	var oDocument = oWindow.document;
	if (!oWindow._init)
	{
		oDocument.open();
		var sLabel = '<LABEL Style="FONT-FAMILY: Times New Roman, Arial, Tahoma; FONT-SIZE: 14px; FONT-STYLE: italic; FONT-WEIGHT: bolder; COLOR: #2A426E">Loading...Please Wait...</LABEL>';
		oDocument.write(sLabel);
		oDocument.close();			
				
		oDocument.location.replace(sURL);
	} 
	
	if (retValue)
		return oWindow;
}


//location for the upper banner - onload in all pages
function checkRes()
{
	var margin  = ((screen.width-945)/2);
	document.getElementById('barUp').style.left = margin;
}

// help registration
function altHelp(str)
{
	var pos  = ((screen.width-780)/2)+(180);
	document.getElementById('altReg').innerHTML = str;
	document.getElementById('altReg').style.visibility = 'visible';
	document.getElementById('altReg').style.right = pos-10;
	document.getElementById('altReg').style.top = event.clientY-10;
}

// check validation of meber passwords
function checkMember()
{
	var memberForm = document.members;
	var mail = document.members.userN.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		document.getElementById("validUser").innerHTML = '* יש להקליד דוא"ל';
		return;
	}
	
	else if (x==-1 || y==-1) {
		document.getElementById("validUser").innerHTML = '* דוא"ל לא חוקי';
		return;
	}
	
	
	if (memberForm.pass.value==""){
		document.getElementById("validUser").innerHTML = '';
		document.getElementById("validPass").innerHTML = '* יש להקליד סיסמא';
		return;
	}
	memberForm.submit();
	
}


// check unregistration for members - unregis.ap
function checkUnregis()
{
	var memberForm = document.unregis;
	var mail = document.unregis.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		memberForm.email.style.backgroundColor="red";
		alert('יש להקליד כתובת אי-מייל');
		return;
	}
	
	else if (x==-1 || y==-1) {
		alert('אי-מייל לא חוקי');
		memberForm.email.style.backgroundColor="red";
		return;
	}
	
	memberForm.submit();
	
}

// check validation of new member form fields - fast regis - from index page
function checkNewMember()
{
	var newMemberForm = document.newMember;
	if (newMemberForm.fname.value==""){
		newMemberForm.fname.style.backgroundColor="red";
		alert('נא להקליד שם מלא');
		return;
	}
	
	
	var mail = document.newMember.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		newMemberForm.email.style.backgroundColor="red";
		alert('יש להקליד כתובת אי-מייל');
		return;
	}
	
	else if (x==-1 || y==-1) {
		alert('אי-מייל לא חוקי');
		newMemberForm.email.style.backgroundColor="red";
		return;
	}
	
	if (newMemberForm.carType.value==""){
		alert('אנא בחרו סוג רכב בבעלותכם');
		return;
	} 
	
	if (newMemberForm.pass.value==""){
		newMemberForm.pass.style.backgroundColor="red";
		alert('נא להקליד סיסמא - עד 8 תווים');
		return;
	}
	
	if (newMemberForm.pass2.value==""){
		newMemberForm.pass2.style.backgroundColor="red";
		alert('נא להקליד את הסיסמא שנית בשדה אישור סיסמא');
		return;
	}
	
	if (newMemberForm.pass.value != newMemberForm.pass2.value){
		newMemberForm.pass2.style.backgroundColor="red";
		alert('הסיסמא בשדה האימות שונה מהסיסמא המקורית');
		return;
	}
	
	newMemberForm.submit();
	
}


// check validation of new member form fields - form regis
function checkNewMemberForm()
{
	var newMemberForm = document.newMemberForm;
	var errFlag = 0
	// empty all span
	document.getElementById("fnameS").innerHTML = '';
	document.getElementById("carTypeS").innerHTML = '';
	document.getElementById("emailS").innerHTML = '';
	document.getElementById("carTypeS").innerHTML = '';
	document.getElementById("passS").innerHTML = '';
	document.getElementById("pass2S").innerHTML = '';
	
	if (newMemberForm.fname.value==""){
		document.getElementById("fnameS").innerHTML = '* יש להקליד שם מלא';
		errFlag = 1;
	}
	
	if (newMemberForm.carType.value==""){
		document.getElementById("carTypeS").innerHTML = '* יש למלא סוג רכב';
		errFlag = 1;
	}
	
	var mail = document.newMemberForm.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		document.getElementById("emailS").innerHTML = '* יש למלא דוא"ל';
		errFlag = 1;
	}
	
	else if (x==-1 || y==-1) {
		document.getElementById("emailS").innerHTML = '* דוא"ל לא חוקי';
		errFlag = 1;
	}
	
	
	if (newMemberForm.pass.value==""){
		document.getElementById("passS").innerHTML = '* יש להקליד סיסמא - עד 8 תווים';
		errFlag = 1;
	}
	
	if (newMemberForm.pass2.value==""){
		document.getElementById("pass2S").innerHTML = '* נא להקליד את הסיסמא שנית בשדה אישור סיסמא';
		errFlag = 1;
	}
	
	else if (newMemberForm.pass.value != newMemberForm.pass2.value){
		document.getElementById("pass2S").innerHTML = '* הסיסמא בשדה האימות שונה מהסיסמא המקורית';
		errFlag = 1;
	}
	
	if (errFlag == 1)
	{
		return;
	}
	
	newMemberForm.submit();
	
}

// check validation of regis member form fields - form regis
function checkRegisMemberForm()
{
	var newMemberForm = document.newMemberForm;
	var errFlag = 0
	// empty all span
	document.getElementById("fnameS").innerHTML = '';
	document.getElementById("carTypeS").innerHTML = '';
	document.getElementById("emailS").innerHTML = '';
	document.getElementById("carTypeS").innerHTML = '';
	document.getElementById("passS").innerHTML = '';
	document.getElementById("pass2S").innerHTML = '';
	
	if (newMemberForm.fname.value==""){
		document.getElementById("fnameS").innerHTML = '* יש להקליד שם מלא';
		errFlag = 1;
	}
	
	if (newMemberForm.carType.value==""){
		document.getElementById("carTypeS").innerHTML = '* יש למלא סוג רכב';
		errFlag = 1;
	}
	
	var mail = document.newMemberForm.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		document.getElementById("emailS").innerHTML = '* יש למלא דוא"ל';
		errFlag = 1;
	}
	
	else if (x==-1 || y==-1) {
		document.getElementById("emailS").innerHTML = '* דוא"ל לא חוקי';
		errFlag = 1;
	}
	
	
	if (newMemberForm.pass.value==""){
		document.getElementById("passS").innerHTML = '* יש להקליד סיסמא - עד 8 תווים';
		errFlag = 1;
	}
	
	if (newMemberForm.pass2.value==""){
		document.getElementById("pass2S").innerHTML = '* נא להקליד את הסיסמא שנית בשדה אישור סיסמא';
		errFlag = 1;
	}
	
	else if (newMemberForm.pass.value != newMemberForm.pass2.value){
		document.getElementById("pass2S").innerHTML = '* הסיסמא בשדה האימות שונה מהסיסמא המקורית';
		errFlag = 1;
	}
	
	if (errFlag == 1)
	{
		return;
	}
	
	newMemberForm.submit();
	
}

// open comment - articleDetaisl.asp
function openComment(commentID)
{
	
	if (document.getElementById(commentID).style.display == 'inline')
		document.getElementById(commentID).style.display = 'none';
	else
		document.getElementById(commentID).style.display = 'inline';
}


// open takanon - for hidon in index page (shared/hidonIndex.asp)
function openTakanon(pollID)
{
	var win;
	win = window.open("takanon.asp?id="+pollID, "takanon", "top=0, left=0, width=380, height=480, status=no, resizable, scrollbars=yes");
	window.focus;
}

// open takanon - for hidon in index page (shared/hidonIndex.asp)
function openRegisTakanon(itemID)
{
	var win;
	win = window.open("RegisTakanon.asp?id="+itemID, "RegisTakanon", "top=0, left=0, width=380, height=480, status=no, resizable, scrollbars=yes");
	window.focus;
}


function checkComment() {
		
	if (document.commentForm.title.value=="") {
		alert('אנא מלא/י כותרת');
		document.commentForm.title.style.backgroundColor='lightYellow';
		return;
	}
	
	if (document.commentForm.fname.value=="") {
		alert('אנא מלא/י את שמך');
		document.commentForm.fname.style.backgroundColor='lightYellow';
		return;
	}
	
	if (document.commentForm.address.value=="") {
		alert('אנא מלא/י אזור מגורים');
		document.commentForm.address.style.backgroundColor='lightYellow';
		return;
	}
	

	var mail = document.commentForm.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	if (mail=='') {
		alert('אנא מלא/י כתובת אי-מייל');
		document.commentForm.email.style.backgroundColor="lightYellow";
		return;
	}
	else if (x==-1 || y==-1) {
		alert('אי-מייל לא חוקי');
		//document.commentForm.email.value='';
		document.commentForm.email.style.backgroundColor="lightYellow";
		return;
	}

	document.commentForm.submit();
}

// open the window spec file - for carDetails.asp	
function newComment (newsID,catID) {
	win = window.open("addComment.asp?cat="+catID+"&id="+newsID , "newComment", "top=0, left=0, width=380, height=480, status=no, resizable, scrollbars=yes")
}


// send search string
function testKeyDown()
{
	var x = event.keyCode;
	if (x == 13)
		checkSearch();
}


// check validation of yoez search
function checkSearch()
{
	var searchForm = document.all;
	if (searchForm.srcStr.value=="")
	{
		searchForm.srcStr.style.backgroundColor="red";
		alert ('יש להקליד מילה לחיפוש');
		return;
	}
	location.href = 'searchSite.asp?str=' + searchForm.srcStr.value
}

// open the window for picture navigation.	
function showGallery(imgPath,itemID,catID)
{
    var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'bigGallery.asp?path='+ imgPath + '&id='+ itemID+'&cat='+ catID +'&urlPath=' + newStr;
	win = window.open(source, "galleryBig", "top=0, left=0, status=no, resizable, scrollbars=yes");
	window.focus;
}


// used in gallery
function galleryImg(imgPath,picN,Page,title)
{
	var source = 'galleryImg.asp?path='+ imgPath + '&picN='+ picN + '&Page=' + Page + '&title=' + title
	win = window.open(source, "imgGallery", "top=0, left=0, status=no, resizable, scrollbars=yes");
	window.focus;
}

// open the window spec file - for carDetails.asp	
function showSpec (fileN) {
	var source = 'images/spec/'+fileN;
	win = window.open(source, "fileSpec", "top=0, left=0, width=630, height=420, status=no, resizable, scrollbars=yes")
}

// open the window for big picture.	
function showBig (path,nameP) {
	var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'imgBig.asp?path='+ path + '&name=' + nameP + '&urlPath=' + newStr;
	win = window.open(source, "imgBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
}

// open print version window
function printDoc(kindRec,itemID)
{
	var win
	win = window.open('printDoc.asp?id='+itemID+'&kind='+kindRec , 'printDoc', 'top=5, left=5, width=660, height=430, status=no, resizable, scrollbars')
	win.focus()
}


// open send to friend window
function sendFriend(titleID)
{
	var win
	var titleStr = titleID.replace('"','``')
	var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'sendFriend.asp?title=' + titleStr + '&urlPath=' + newStr;
	win = window.open(source, 'sendFriend', 'top=5, left=5, width=390, height=430, status=no, resizable')
	win.focus()
}

// open subMenu - center.asp

var olditem;
olditem = '';

function showSub(kind,plc,high)
{
	var pos  = ((screen.width-780)/2)+(118*plc);
	if (kind != olditem && olditem!= '' )
	{
		document.getElementById(olditem).style.visibility = 'hidden';
	}
	if (kind=='News') // for first line HADASHOT
	{
		document.getElementById(kind).style.left = pos+50;
	}
	else
	{
		document.getElementById(kind).style.left = pos-2;
	}
	//document.getElementById(kind).style.left = pos-2;
	document.getElementById(kind).style.top = high;
	document.getElementById(kind).style.visibility = 'visible';
	if (document.getElementById(kind).style.visibility == 'visible')
		olditem = kind
}

// close subMenu - center.asp
function hideSub()
{
	//document.getElementById("Maintenance").style.visibility = 'hidden';
	//document.getElementById("Gallery").style.visibility = 'hidden';
	//document.getElementById("News").style.visibility = 'hidden';
	//document.getElementById("Links").style.visibility = 'hidden';
	if (olditem != ''){
		document.getElementById(olditem).style.visibility = 'hidden';
	}
}

function showSubSide(kind,plc)
{
	var pos  = ((screen.width-780)/2)+(180);
	if (kind != olditem && olditem!= '' )
	{
		document.getElementById(olditem).style.visibility = 'hidden';
	}
	document.getElementById(kind).style.right = pos;
	document.getElementById(kind).style.top = event.clientY-30;
	document.getElementById(kind).style.visibility = 'visible';
	if (document.getElementById(kind).style.visibility == 'visible')
		olditem = kind
}

function doRegis()
{
	var newMemberForm = document.regis;
	if (newMemberForm.fname.value=="" || newMemberForm.fname.value=="שם פרטי"){
		newMemberForm.fname.style.backgroundColor="red";
		return;
	}
	
	if (newMemberForm.lname.value=="" || newMemberForm.lname.value=="שם משפחה"){
		newMemberForm.lname.style.backgroundColor="red";
		return;
	}
	
	if (newMemberForm.carID.value=="0"){
		alert('יש לבחור סוג רכב');
		return;
	}
	
	var mail = document.regis.email.value;
	var x = mail.indexOf ("@");
	var y = mail.indexOf (".");
	
	if (mail=='') {
		newMemberForm.email.style.backgroundColor="red";
		return;
	}
	
	else if (x==-1 || y==-1) {
		newMemberForm.email.value = 'אי-מייל לא חוקי';
		return;
	}
	
	newMemberForm.submit();
}

// for question sending
function addQ (carID,centerID)
{
	win = window.open('sendQuestion.asp?car='+carID+'&center='+centerID+'','AddQuestion', 'top=5, left=5,  height=500, width=400 , status=no, scrollbars=yes, resizable')
	win.focus();
}

// check question form - sendQuestion.asp

function checkQuestion() {
		
		if (document.question.fname.value=="") {
			document.question.fname.style.backgroundColor='red';
			return;
		}
		
		var mail = document.question.email.value;
		var x = mail.indexOf ("@");
		var y = mail.indexOf (".");
		if (mail=='') {
			document.question.email.style.backgroundColor="red";
			return;
		}
		else if (x==-1 || y==-1) {
			document.question.email.value='אי-מייל לא חוקי';
			return;
		}
		
		if (document.question.questionTxt.value=="") {
			document.question.questionTxt.value='הקלד את שאלתך';
			document.question.questionTxt.style.backgroundColor='lightYellow';
			return;
		}

		document.question.submit();
	}
	
// check contact form - sendContact.asp

function checkContact() {
		
		if (document.question.fname.value=="") {
			document.question.fname.style.backgroundColor='red';
			return;
		}
		
		var mail = document.question.email.value;
		var x = mail.indexOf ("@");
		var y = mail.indexOf (".");
		if (mail=='') {
			document.question.email.style.backgroundColor="red";
			return;
		}
		else if (x==-1 || y==-1) {
			document.question.email.value='אי-מייל לא חוקי';
			return;
		}
		
		if (document.question.questionTxt.value=="") {
			document.question.questionTxt.value='הקלד את בקשתך';
			document.question.questionTxt.style.backgroundColor='lightYellow';
			return;
		}

		document.question.submit();
	}

	
// check send to friend form - sendToFriend.asp

function checkFriend() {
		
		if (document.question.fname.value=="") {
			document.question.fname.style.backgroundColor='red';
			return;
		}
		
		var mail = document.question.email.value;
		var x = mail.indexOf ("@");
		var y = mail.indexOf (".");
		if (mail=='') {
			document.question.email.style.backgroundColor="red";
			return;
		}
		else if (x==-1 || y==-1) {
			document.question.email.value='אי-מייל לא חוקי';
			return;
		}
		
		if (document.question.friendname.value=="") {
			document.question.friendname.style.backgroundColor='red';
			return;
		}
		
		var mail2 = document.question.friendemail.value;
		var x = mail2.indexOf ("@");
		var y = mail2.indexOf (".");
		if (mail2=='') {
			document.question.friendemail.style.backgroundColor="red";
			return;
		}
		else if (x==-1 || y==-1) {
			document.question.friendemail.value='אי-מייל לא חוקי';
			return;
		}
		
		document.question.submit();
	}

// change the model of motobikes in select box - search motor
function changeModels(inForm,selected) { 
var selectedArray = eval('m' + selected + 'Arr');
while (selectedArray.length < inForm.models.options.length) {
	inForm.models.options[(inForm.models.options.length - 1)] = null;
}

 
for (var i=0; i < selectedArray.length; i++) { 
eval('inForm.models.options[i]=' + 'new Option' + selectedArray[i]); 
 } 
if (inForm.man.options[0].value == '') { 
inForm.man.options[0]= null; 
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) { 
window.history.go(0); 
} 
else {  	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') { 
window.history.go(0); 
} 
} 
} 
} 
} 


// change the model of motobikes in select box - search motor
function changeModels2(inForm,selected) { 
var selectedArray = eval('a' + selected + 'Arr');
while (selectedArray.length < inForm.models2.options.length) {
 inForm.models2.options[(inForm.models2.options.length - 1)] = null;
} 
for (var i=0; i < selectedArray.length; i++) { 
eval('inForm.models2.options[i]=' + 'new Option' + selectedArray[i]); 
 } 
if (inForm.man2.options[0].value == '') { 
inForm.man2.options[0]= null; 
if ( navigator.appName == 'Netscape') {
if (parseInt(navigator.appVersion) < 4) { 
window.history.go(0); 
} 
else {  	
if (navigator.platform == 'Win32' || navigator.platform == 'Win16') { 
window.history.go(0); 
} 
} 
} 
} 
} 

//check values in advance search form - motors search
function checkSearchForm(form1)
{
	

	if (parseInt(form1.engineFrom.options[form1.engineFrom.selectedIndex].value) > parseInt(form1.engineTo.options[form1.engineTo.selectedIndex].value ))

	 {

	 alert("נפח מנוע מ גדול מנפח מנוע עד");

	 return false;

	 }
	 
	 if (parseInt(form1.yearFrom.options[form1.yearFrom.selectedIndex].value) > parseInt(form1.yearTo.options[form1.yearTo.selectedIndex].value ))

	 {

	 alert("שנה מ גדול משנה עד");

	 return false;

	 }
	 
	 if (parseInt(form1.priceFrom.options[form1.priceFrom.selectedIndex].value) > parseInt(form1.priceTo.options[form1.priceTo.selectedIndex].value ))

	 {

	 alert("מחיר מ גדול ממחיר עד");


	 return false;

	 }
	 
form1.submit()
	
}

function showArchive(pollID)
{
	if (pollID=='')
		return;
	else
		document.location.href = 'showResualts.asp?id='+ pollID;

}

// open big pictures of ships
function openBig(picN)
{
	var source = 'bigPic.asp?picN='+ picN;
	win = window.open(source, "galleryBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
	window.focus;
}

function openEquipt(picN,title)
{
	var source = 'viewEquipt.asp?picN='+ picN + '&title=' + title;
	win = window.open(source, "equiptBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
	window.focus;
}

// handle sub menu items

// handle side menu
  function setLowerMenuSide(kind,distH,tdID)
  {
    
	var lowerMenuSide = document.all["subMenuSide"]
		

	if (linkset[kind]!='<table class="subMenuSide">') 
	{
		document.all["menuDivSide"].style.visibility='visible';
		document.all["menuDivSide"].style.left = 145;
		document.all["menuDivSide"].style.top=distH;
	}
	
	else
	{
		hideLowerMenuSide();
	}
	 
	var ieVersion = window.navigator.appVersion;
	var msieIndex = ieVersion.indexOf("MSIE");
	var beginStr = msieIndex + 5;
	var ieVersionNumber = parseFloat(ieVersion.substr(beginStr, 4));

	if (ieVersionNumber >= 5.5)
		lowerMenuSide.filters[0].apply();
	
	lowerMenuSide.innerHTML = linkset[kind];
	
	if (ieVersionNumber >= 5.5)
		lowerMenuSide.filters[0].play();
	
 }
  
 // hide the side sub menu - used in side menu
   function hideMenuSide()
  {
  	document.all["menuDivSide"].style.visibility='hidden';
  }
  
  // open the window for picture navigation.	
function showGallery(imgPath,itemID,catID)
{
    var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'bigGallery.asp?path='+ imgPath + '&id='+ itemID+'&cat='+ catID +'&urlPath=' + newStr;
	win = window.open(source, "galleryBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
}

// open the window for big picture.	
function showBig (path,nameP) {
	var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'imgBig.asp?path='+ path + '&name=' + nameP + '&urlPath=' + newStr;
	win = window.open(source, "imgBig", "top=0, left=0, status=no, resizable, scrollbars=yes")
}

// open print version window
function printDoc(kindRec,itemID)
{
	var win
	win = window.open('printDoc.asp?id='+itemID+'&kind='+kindRec , 'printDoc', 'top=5, left=5, width=660, height=430, status=no, resizable, scrollbars')
	win.focus()
}

// open send to friend window
function sendFriend(titleID)
{
	var win
	var titleStr = titleID.replace('"','``')
	var org = document.URL;
	var what = /&/g;
	var newStr = org.replace(what,'@@@');
	var source = 'sendFriend.asp?title=' + titleStr + '&urlPath=' + newStr;
	win = window.open(source, 'sendFriend', 'top=5, left=5, width=390, height=430, status=no, resizable')
	win.focus()
}



