//Disable right click script 
if (document.getElementById("bigpic-container")){
	document.getElementById("bigpic-container").oncontextmenu=new Function("return false");
}else if (document.getElementById("userphotoimg")){
	document.getElementById("userphotoimg").oncontextmenu=new Function("return false");
	document.getElementById("friends").oncontextmenu=new Function("return false");
}else{
	arrimageborder = getElementsByClassName("imageborder");
	for(var i = 0; i < arrimageborder.length; i++ ) {
		arrimageborder[i].oncontextmenu=new Function("return false");
	}
	arrimageborder = getElementsByClassName("imageborderfeatured");
	for(var it = 0; it < arrimageborder.length; it++ ) {
		arrimageborder[it].oncontextmenu=new Function("return false");
	}
}

function disableselect(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}

function getElementsByClassName(classname, node) {
	if(!node) node = document.getElementsByTagName("body")[0];
	var a = [];
	var re = new RegExp('\\b' + classname + '\\b');
	var els = node.getElementsByTagName("*");
	for(var i=0,j=els.length; i<j; i++)
	if(re.test(els[i].className))a.push(els[i]);
	return a;
}

/*gifts*/
if (document.getElementById("mygifts")){
    document.getElementById("mygifts").oncontextmenu=new Function("return false");
}
if (document.getElementById("storecontainer")){
    arg = getElementsByClassName("gift");
    for(var e = 0; e < arg.length; e++ ) {
        arg[e].oncontextmenu=new Function("return false");
    }
}
if (document.getElementById("lpicture")){
    document.getElementById("lpicture").oncontextmenu=new Function("return false");
}
if (document.getElementById("giftitem")){
    document.getElementById("giftitem").oncontextmenu=new Function("return false");
}
if (document.getElementById("mgfcn")){
    armg = getElementsByClassName("blockme");
    for(var d = 0; d < armg.length; d++ ) {
        armg[d].oncontextmenu=new Function("return false");
    }
}
if (document.getElementById("gift_table")){
    armg = getElementsByClassName("imgcontainer");
    for(var h = 0; h < armg.length; h++ ) {
        armg[h].oncontextmenu=new Function("return false");
    }
}
if (document.getElementById("container_gifts") ){
    arg = document.getElementById("container_gifts");
    for(var f = 0; f < arg.childNodes.length; f++ ) {
        arg.childNodes[f].oncontextmenu=new Function("return false");
    }
}
if (document.getElementById("premiun_item_img")){
    document.getElementById("premiun_item_img").oncontextmenu=new Function("return false");
}
if (document.getElementById("store-content")){
    document.getElementById("store-content").oncontextmenu=new Function("return false");
}

