function suggest(link){
	alert(link)
}

function addBookmark() {
  if (window.external)
    external.AddFavorite(location.href,"Art At Play - Contemporary art in Thailand")
  else
    alert("Your browser doesn't support this feature.")
}

function email2f(){
	var attribs = "location=no, scrollbars=no, menubars=no, toolbars=no, titlebar=no, resizable=no, left=50, top=50, width=330, height=430"
	email = window.open("pops/friend.html",null,attribs)
}

function privates(){
	var attribs = "location=no, scrollbars=no, menubars=no, toolbars=no, titlebar=no, resizable=no, left=50, top=50, width=420, height=520"
	email = window.open("pops/privacy.html",null,attribs)
}

function pop_chat(){
	var attribs = "location=no, scrollbars=no, menubars=no, toolbars=no, titlebar=no, resizable=no, left=50, top=50, width=420, height=360"
	email = window.open("scripts/live/chat.php",null,attribs)
}

function large(pic){
	document.location='scripts/records/details.php?file='+pic
}

function profile(pic){
	document.location='scripts/records/profile.php?file='+pic
}

function profile2(pic){
	document.location='../../scripts/records/profile.php?file='+pic
}

function large2(pic,dir){
	var attribs = "location=no, scrollbars=no, menubars=no, toolbars=no, titlebar=no, resizable=no, left=50, top=50, width=500, height=450"
	var name=pic+'.jpg'
	displays = window.open(pic,null,attribs)
}

function large3(pic){
	document.location='../../scripts/records/details.php?file='+pic
}

function guestmap(){
window.open('http://pub20.bravenet.com/guestmap/show.php?usernum=1674657287&lightmap=0&icons=0&&entrylist=0&zoom=0&welcome=0','bnetguestmap','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=720,height=470,top=20,left=20')
}

function posters(pic){
	var attribs = "location=no, scrollbars=yes, menubars=no, toolbars=no, titlebar=no, resizable=no, left=10, top=10, width=400, height=600"
	var name='pics/posters/'+pic+'.jpg'
	poster = window.open(name,null,attribs)
}

function xe(price){
	var attribs = "location=no, scrollbars=no, menubars=no, toolbars=no, titlebar=no, resizable=no, left=50, top=50, width=380, height=470"
	email = window.open("pops/convert.html?price="+price,null,attribs)
}

function BW_reload() {location.reload();}

function centerLayers() { //v4.1.1
//if (title=='style2') {
//alert ('no center')
//return
//}
	if (document.layers || document.all || document.getElementById){
		var winWidth, winHeight, i, horz, vert, width, height, offsetX, offsetY, negX, negY, group, x, y, args;
		args = centerLayers.arguments;
		onresize = BW_reload;

		winWidth = (document.all)?document.body.clientWidth:window.innerWidth;
		winHeight = (document.all)?document.body.clientHeight:window.innerHeight;
//alert (winWidth)
		for (i=0; i<(args.length-9); i+=10) {
			horz    = args[i+1];
			vert    = args[i+2];
			width   = parseInt(args[i+3]);
			height  = parseInt(args[i+4]);
			offsetX = parseInt(args[i+5]);
			offsetY = parseInt(args[i+6]);
			negX    = args[i+7];
			negY    = args[i+8];

			x = ((winWidth - width)/2) + offsetX;
			y = ((winHeight - height)/2) + offsetY;

			x = (negX=='false' && (x < 0))?0:x;
			y = (negY=='false' && (y < 0))?0:y;

			layerObj = (document.getElementById)?document.getElementById(args[i]):MM_findObj(args[i]);
			if (layerObj!=null) {
				layerObj = (layerObj.style)?layerObj.style:layerObj;
				layerObj.left = (horz=="true")?x+'px':layerObj.left;
				layerObj.top = (vert=="true")?y+'px':layerObj.top;
			}
		}
	}
}


// tool tips functions

function createCookie(name,value,days) {
	if (days) {
		var date = new Date()
	    date.setTime(date.getTime()+(days*24*60*60*1000))
	    var expires = "; expires="+date.toGMTString()
	}
	else expires = ""
	document.cookie = name+"="+value+expires+"; path=/"
}

function readCookie(name) {
	var nameEQ = name + "="
	var ca = document.cookie.split(';')
	for(var i=0;i < ca.length;i++) {
		var c = ca[i]
		while (c.charAt(0)==' ') c = c.substring(1,c.length)
	    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)
	}
	return null
}

function setTips(set){
	tipschoice=set

}

function getTipsChoice(){
	return false

}

window.onload = function(e) {
	var cookie = readCookie("tips")
	var tipschoice = cookie ? cookie : true
}

window.onunload = function(e) {
	createCookie("tips", tipschoice, 365)
}

var cookie = readCookie("tips")
var tipschoice = cookie ? cookie : true

function email(link){
/***********************************************
* Encrypt Email script- Please keep notice intact.
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/

var emailarray5271= new Array(105,110,102,111,64,97,114,116,97,116,112,108,97,121,46,99,111,109)
var postemail5271=''
for (i=0;i<emailarray5271.length;i++)
postemail5271+=String.fromCharCode(emailarray5271[i])

if (link) document.write('<a href="mailto:'+postemail5271+'">'+postemail5271+'</a>')
else document.write(postemail5271)
}

function emailmaster(link){
/***********************************************
* Encrypt Email script- Please keep notice intact.
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/

var emailarray2829= new Array(119,101,98,109,97,115,116,101,114,64,97,114,116,97,116,112,108,97,121,46,99,111,109)
var postemail2829=''
for (i=0;i<emailarray2829.length;i++)
postemail2829+=String.fromCharCode(emailarray2829[i])

if (link) document.write('<a href="mailto:'+postemail2829+'">'+postemail2829+'</a>')
else document.write(postemail2829)
}

function emailcommerce(link){
/***********************************************
* Encrypt Email script- Please keep notice intact.
* Tool URL: http://www.dynamicdrive.com/emailriddler/
* **********************************************/

var emailarray7068= new Array(99,111,109,109,101,114,99,101,64,97,114,116,97,116,112,108,97,121,46,99,111,109)
var postemail7068=''
for (i=0;i<emailarray7068.length;i++)
postemail7068+=String.fromCharCode(emailarray7068[i])

if (link) document.write('<a href="mailto:'+postemail7068+'">'+postemail7068+'</a>')
else document.write(postemail2829)
}

// new centre layers ?  not working - need to sort this out and take 'left:150px' from style sheet
function Is() {
    agent  = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
	 this.ns = ((agent.indexOf('mozilla') != -1) && 
	      (agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1) &&
		 (agent.indexOf('opera') == -1) &&
		 (agent.indexOf('webtv') == -1));	
    this.ns2   = (this.ns && (this.major      ==    3));
    this.ns3   = (this.ns && (this.major      ==    3));
    this.ns4   = (this.ns && (this.major      ==    4));
    this.ns6   = (this.ns && (this.major      >=    5));
    this.ie    = (agent.indexOf("msie")       !=   -1);
    this.ie3   = (this.ie && (this.major      < 4));
    this.ie4   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   ==   -1));
    this.ie5   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   !=   -1));
	this.ieX = (this.ie && !this.ie3 && !this.ie4); 
}

var is = new Is();

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

var clickmessage='If you wish to use an image please contact us for details' 

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

//if (document.all)
//document.onmousedown=disableclick
//else if (document.getElementById)
//document.onmouseup=disableclick
//else if (document.layers)
//associateimages()
