function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
	if (document.images) {
		but_1_over = newImage("/images/but_1-over.gif");
		but_2_over = newImage("/images/but_2-over.gif");
		but_3_over = newImage("/images/but_3-over.gif");
		but_4_over = newImage("/images/but_4-over.gif");
		but_5_over = newImage("/images/but_5-over.gif");
		but_6_over = newImage("/images/but_6-over.gif");
		but_7_over = newImage("/images/but_7-over.gif");
		but_8_over = newImage("/images/but_8-over.gif");
		but_9_over = newImage("/images/but_9-over.gif");
		preloadFlag = true;
}



var oneTimeWinName = "oneTimePop"
function openPopWinOnce(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  var d_winLeft = 20  // default, pixels from screen left to window left
  var d_winTop = 20   // default, pixels from screen top to window top
  var popcookies = document.cookie
  if (openPopWinOnce.arguments.length >= 4)  // any additional features? 
    winFeatures = "," + winFeatures
  else 
    winFeatures = "" 
  if (openPopWinOnce.arguments.length == 6)  // location specified
    winFeatures += getLocationOne(winWidth, winHeight, winLeft, winTop)
  else
    winFeatures += getLocationOne(winWidth, winHeight, d_winLeft, d_winTop)
  if (popcookies.indexOf(oneTimeWinName) == -1){ // cookie not found 
    window.open(winURL, oneTimeWinName, "width=" + winWidth 
           + ",height=" + winHeight + winFeatures)
    document.cookie=oneTimeWinName+"=used"
    }
  }
function openPopWinOnceBack(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  openPopWinOnce(winURL, winWidth, winHeight, winFeatures, winLeft, winTop)
  self.focus()
  }
function getLocationOne(winWidth, winHeight, winLeft, winTop){
  return ""
  }

function order3(id){
			win = window.open("http://www.4mobilefun.com/en/uk/realtones/order/"+id, "order", "scrollbars=yes,resizable=yes, width=320, height=550");
		}

function order2(id){
			win = window.open("http://www.4mobilefun.com/en/uk/polyringtones/order/"+id, "order", "scrollbars=yes,resizable=yes, width=320, height=550");
		}

function order1(id){
			win = window.open("http://www.4mobilefun.com/en/uk/ringtones/order/"+id, "order", "scrollbars=yes,resizable=yes, width=320, height=550");
		}

function listen3(id){
			
			win = window.open('http://www.4mobilefun.com/en/uk/realtones/preview/' + id, "listenPreview", "scrollbars=yes,resizable=yes, width=310, height=660")
		}

function listen1(id){

			win = window.open('http://www.4mobilefun.com/en/uk/ringtones/preview/' + id, "listenPreview", "scrollbars=yes,resizable=yes, width=310, height=660")
		}

function listen2(id){

			win = window.open('http://www.4mobilefun.com/en/uk/polyringtones/preview/' + id, "listenPreview", "scrollbars=yes,resizable=yes, width=310, height=660")
		}


function getitfree3(id){
			getitfreewin = window.open("http://www.4mobilefun.com/en/uk/realtones/getitfree/"+id, "getitfreewin", "scrollbars=yes,resizable=yes, width=330, height=565");
		}


function getitfree2(id){
			getitfreewin = window.open("http://www.4mobilefun.com/en/uk/polyringtones/getitfree/"+id, "getitfreewin", "scrollbars=yes,resizable=yes, width=330, height=565");
		}


